From c5de0d6ef3b473c569e44935f5ac8a57567ef93e Mon Sep 17 00:00:00 2001 From: Tunisiano18 Date: Sat, 16 Mar 2024 12:25:28 +0100 Subject: [PATCH] Show the file nuspec that caused that error When there is an error, the error in the au package, the error isn't shown on the right line. This change will give the nuspec file name in the error to help. Signed-off-by: Tunisiano18 --- Wormies-AU-Helpers/public/Update-Metadata.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Wormies-AU-Helpers/public/Update-Metadata.ps1 b/Wormies-AU-Helpers/public/Update-Metadata.ps1 index c597fe9..be9fee1 100644 --- a/Wormies-AU-Helpers/public/Update-Metadata.ps1 +++ b/Wormies-AU-Helpers/public/Update-Metadata.ps1 @@ -124,7 +124,7 @@ function Update-Metadata { $nu.package.metadata."$_" = $data[$_] } else { - Write-Warning "$_ does not exist on the metadata element in the nuspec file" + Write-Warning "$_ does not exist on the metadata element in the nuspec file ($NuspecFile)" } } } @@ -140,7 +140,7 @@ function Update-Metadata { if (![string]::IsNullOrEmpty( $NodeGroup.Attributes ) ) { $NodeGroup.SetAttribute($attrib, $NodeAttributes[$attrib] ) } else { - Write-Warning "Attribute $attrib not defined for $_ in the nuspec file" + Write-Warning "Attribute $attrib not defined for $_ in the nuspec file ($NuspecFile)" } } }