From 6a216819fae074993af9effb3a74c688392ad215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Domeradzki?= Date: Tue, 16 Mar 2021 23:13:17 +0100 Subject: [PATCH] AppVeyor: Ignore network issues (#2243) --- appveyor.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 4cac724e9..e4c03c043 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -50,14 +50,24 @@ install: if ($env:DOTNET_CHANNEL) { dotnet --info - &([scriptblock]::Create((Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1'))) -Channel "$env:DOTNET_CHANNEL" -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath + try { + &([scriptblock]::Create((Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1'))) -Channel "$env:DOTNET_CHANNEL" -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath + } catch [System.Net.WebException],[System.IO.IOException] { + # Not fatal for the remaining part of the script + Write-Host $_ + } } if ($env:DOTNET_SDK) { dotnet --info - &([scriptblock]::Create((Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1'))) -Channel 'Current' -Version "$env:DOTNET_SDK" -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath + try { + &([scriptblock]::Create((Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1'))) -Channel 'Current' -Version "$env:DOTNET_SDK" -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath + } catch [System.Net.WebException],[System.IO.IOException] { + # Not fatal for the remaining part of the script + Write-Host $_ + } } - ps: Install-Product node "$env:NODE_JS_VERSION" before_build: