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']); } }