Skip to content

Commit

Permalink
fix: Use-Git Pipeline step validation ( Fixes #312 )
Browse files Browse the repository at this point in the history
Improving inner error handling (removing error a little later)
  • Loading branch information
James Brundage committed Oct 12, 2024
1 parent 56e56ad commit f98c62d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Commands/Use-Git.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@
} catch {
# If we failed to create the script block, the error is noise.
$err = $_
Write-Debug -Message "Failed to create script block from '$ToValidate' : $($err.Exception.Message)"
$Error.RemoveAt(0)
Write-Debug -Message "Failed to create script block from '$ToValidate' : $($err.Exception.Message)"
}
if (-not $callingContext) { $error.RemoveAt(0)}
}
foreach ($commandElement in $callingContext.CommandElements) {
if (-not $commandElement.parameterName) { continue } # that is a Powershell parameter
Expand Down

0 comments on commit f98c62d

Please sign in to comment.