From acd26e01623ba1a5c1badb6378f59b5e35c99ddf Mon Sep 17 00:00:00 2001 From: pathmapper Date: Sun, 16 Jun 2019 22:03:37 +0200 Subject: [PATCH] Update only if wanted version is not available --- appveyor.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8221e3f..c47656a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,8 +9,14 @@ platform: - x86 - x64 install: - # https://www.appveyor.com/docs/lang/nodejs-iojs/#installing-any-version-of-nodejs-or-iojs - - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:PLATFORM + # https://github.com/appveyor/ci/issues/2921#issuecomment-501016533 + - ps: | + try { + Install-Product node $env:nodejs_version $env:platform + } catch { + echo "Unable to install node $env:nodejs_version, trying update..." + Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:platform + } - md public - npm --vs2015 install --global windows-build-tools - npm install