We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 761b52a commit 90fb75aCopy full SHA for 90fb75a
scripts/release-tag.ps1
@@ -20,8 +20,15 @@ if ($PSVersionTable.PSVersion.Major -ge 7) {
20
21
function Invoke-GitText {
22
param([string[]]$GitArgs)
23
- $output = @(& git @GitArgs 2>&1)
24
- $exitCode = $LASTEXITCODE
+ $originalErrorAction = $ErrorActionPreference
+ try {
25
+ $ErrorActionPreference = "Continue"
26
+ $output = @(& git @GitArgs 2>&1)
27
+ $exitCode = $LASTEXITCODE
28
+ }
29
+ finally {
30
+ $ErrorActionPreference = $originalErrorAction
31
32
if ($null -eq $exitCode) { $exitCode = 0 }
33
return [pscustomobject]@{
34
exitCode = [int]$exitCode
0 commit comments