From 19603a2b921e4f438cf073363776bff3b767e703 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 15 Jul 2022 11:11:37 -0700 Subject: [PATCH] Ensure version comes from the just-installed toolchain --- action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 5bf7643..90d079f 100644 --- a/action.yml +++ b/action.yml @@ -50,9 +50,9 @@ runs: - id: rustc-version run: | : create cachekey - DATE=$(rustc --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') - HASH=$(rustc --version --verbose | sed -ne 's/^commit-hash: //p') + DATE=$(rustc +${{inputs.toolchain}} --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') + HASH=$(rustc +${{inputs.toolchain}} --version --verbose | sed -ne 's/^commit-hash: //p') echo "::set-output name=cachekey::$(echo $DATE$HASH | head -c12)" shell: bash - - run: rustc --version --verbose + - run: rustc +${{inputs.toolchain}} --version --verbose shell: bash