feat: allow disabling the rustup default functionality

This commit is contained in:
BD103 2025-04-22 09:45:10 -04:00 committed by GitHub
parent 56f84321db
commit 87ac5504bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,6 +18,10 @@ inputs:
components: components:
description: Comma-separated list of components to be additionally installed description: Comma-separated list of components to be additionally installed
required: false required: false
make-default:
description: Make the installed toolchain the default -- must be 'true' or 'false'
required: false
default: 'true'
outputs: outputs:
cachekey: cachekey:
@ -81,6 +85,7 @@ runs:
- run: rustup default ${{steps.parse.outputs.toolchain}} - run: rustup default ${{steps.parse.outputs.toolchain}}
shell: bash shell: bash
if: inputs.make-default == 'true'
continue-on-error: true # https://github.com/dtolnay/rust-toolchain/issues/127 continue-on-error: true # https://github.com/dtolnay/rust-toolchain/issues/127
- id: rustc-version - id: rustc-version