From 49a71e44df6cc35061828c5289632588b556ab1a Mon Sep 17 00:00:00 2001 From: softprops Date: Sat, 26 Oct 2019 17:01:41 -0400 Subject: [PATCH 1/2] update rustup before for reliable nightly toolchain tool availability --- src/main.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.ts b/src/main.ts index 0d4db90..5143c57 100644 --- a/src/main.ts +++ b/src/main.ts @@ -17,6 +17,11 @@ async function run() { if(version) { await rustup.install(); + if (os.platform() !== 'darwin') { + // update the GitHub managed VM version of rustup + // to leverage newer features like "latest latest compatible nightly" + await exec.exec('rustup', ['self', 'update']); + } await exec.exec('rustup', ['default', version]); await exec.exec('rustup', ['update', version]); From 29e528e000298ff76c789bdb595c586468907050 Mon Sep 17 00:00:00 2001 From: softprops Date: Sun, 27 Oct 2019 01:14:57 -0400 Subject: [PATCH 2/2] update rustup as part of install step --- src/main.ts | 5 ----- src/rustup.ts | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main.ts b/src/main.ts index 5143c57..0d4db90 100644 --- a/src/main.ts +++ b/src/main.ts @@ -17,11 +17,6 @@ async function run() { if(version) { await rustup.install(); - if (os.platform() !== 'darwin') { - // update the GitHub managed VM version of rustup - // to leverage newer features like "latest latest compatible nightly" - await exec.exec('rustup', ['self', 'update']); - } await exec.exec('rustup', ['default', version]); await exec.exec('rustup', ['update', version]); diff --git a/src/rustup.ts b/src/rustup.ts index 3341d7b..f2b412c 100644 --- a/src/rustup.ts +++ b/src/rustup.ts @@ -14,6 +14,10 @@ export async function install() { core.debug('rustup is located under: ' + toolPath); core.addPath(path.join(toolPath, 'bin')); + } else { + // update the GitHub managed VM version of rustup + // to leverage newer features like "latest latest compatible nightly" + await exec.exec('rustup', ['self', 'update']); } }