diff --git a/.github/actions/setup-rust/action.yml b/.github/actions/setup-rust/action.yml index 57d51d1ca09..8924813991d 100644 --- a/.github/actions/setup-rust/action.yml +++ b/.github/actions/setup-rust/action.yml @@ -58,8 +58,12 @@ runs: shell: bash run: | rustup toolchain install "$TOOLCHAIN" --profile minimal - [[ -n "$TARGETS" ]] && rustup target add --toolchain "$TOOLCHAIN" ${TARGETS//,/ } - [[ -n "$COMPONENTS" ]] && rustup component add --toolchain "$TOOLCHAIN" ${COMPONENTS//,/ } + if [[ -n "$TARGETS" ]]; then + rustup target add --toolchain "$TOOLCHAIN" ${TARGETS//,/ } + fi + if [[ -n "$COMPONENTS" ]]; then + rustup component add --toolchain "$TOOLCHAIN" ${COMPONENTS//,/ } + fi env: TOOLCHAIN: ${{ steps.toolchain-config.outputs.toolchain }} TARGETS: ${{ inputs.targets }}