Skip to content

Commit

Permalink
utils.pwsh: Move curl options to array
Browse files Browse the repository at this point in the history
  • Loading branch information
RytoEX committed Aug 1, 2024
1 parent ea5390c commit ccc47dc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion utils.pwsh/Invoke-SafeWebRequest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,14 @@ function Invoke-SafeWebRequest {
}
}

Invoke-External curl --fail --location $(if ( $Env:CI -eq $null ) { '--progress-bar' }) --output $OutFile @HeaderStrings $Uri
$CurlOptions = @(
'--fail'
'--location'
$(if ( $Env:CI -eq $null ) { '--progress-bar' })
'--output', "$OutFile"
)

Invoke-External curl @CurlOptions @HeaderStrings $Uri

$NewHash = Get-FileHash -Path $OutFile -Algorithm $Algorithm
}
Expand Down

0 comments on commit ccc47dc

Please sign in to comment.