Skip to content

Commit

Permalink
update windows pwsh
Browse files Browse the repository at this point in the history
  • Loading branch information
admercs committed Feb 28, 2024
1 parent e00c8b0 commit 04fd5f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/mod_rpclib.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ function Install-RpcLib {
Write-Output ' Installing rpclib...'
Write-Output '-----------------------------------------------------------------------------------------'
}
Remove-Item '.\temp\rpclib.zip' -Force 2>$null
Remove-Item '.\temp\rpclib.zip' -Force -ErrorAction Continue 2>$null
# Set security protocol used for web requests and download rpclib
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 # TLS v1.2
Invoke-WebRequest "$RpcLibUrl" -OutFile '.\temp\rpclib.zip' -HttpVersion '2.0'
# Unpack and remove archive
Expand-Archive -Path '.\temp\rpclib.zip' -DestinationPath '.\external\rpclib'
Remove-Item '.\temp\rpclib.zip'
Remove-Item '.\temp\rpclib.zip' -Force -ErrorAction Continue 2>$null
# Fail build if unable to download and/or unpack rpclib
if ( -not (Test-Path -LiteralPath "$RpcLibPath") ) {
Write-Error 'Error: Unable to download rpclib. Stopping build.' -ErrorAction SilentlyContinue
Expand Down Expand Up @@ -148,7 +148,7 @@ function Test-RpcLibVersion {
)
if ( -not (Test-Path -LiteralPath "$RpcLibPath") ) {
# Remove previous installations
Remove-Item '.\external\rpclib' -Force -Recurse 2>$null
Remove-Item '.\external\rpclib' -Force -Recurse -ErrorAction Continue 2>$null
Install-RpcLib
Build-RpcLib -BuildMode "$BuildMode" -CmakeGenerator "$CmakeGenerator"
# Fail if rpclib version path not found
Expand Down

0 comments on commit 04fd5f2

Please sign in to comment.