From 404bb95f096d9322cfce237d6fe5fddff0e98d9a Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 20 Jul 2022 14:53:46 -0700 Subject: [PATCH] Do the fallback from targets to target as a yaml expression --- action.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/action.yml b/action.yml index b39cddc..9abf453 100644 --- a/action.yml +++ b/action.yml @@ -30,13 +30,11 @@ runs: - id: flags run: | : construct rustup command line - if [[ -z "$targets" ]]; then targets=$target; fi echo "::set-output name=targets::$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" echo "::set-output name=components::$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" echo "::set-output name=downgrade::${{inputs.toolchain == 'nightly' && inputs.components && ' --allow-downgrade' || ''}}" env: - targets: ${{inputs.targets}} - target: ${{inputs.target}} + targets: ${{inputs.targets || input.target || ''}} components: ${{inputs.components}} shell: bash