From 04fd5f2a60540b120601753ce699fbfada9336ce Mon Sep 17 00:00:00 2001 From: admercs Date: Tue, 27 Feb 2024 20:05:53 -0800 Subject: [PATCH] update windows pwsh --- scripts/mod_rpclib.psm1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/mod_rpclib.psm1 b/scripts/mod_rpclib.psm1 index 2c4c8b69..af468dc2 100644 --- a/scripts/mod_rpclib.psm1 +++ b/scripts/mod_rpclib.psm1 @@ -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 @@ -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