Skip to content

Commit b065e5a

Browse files
committed
Install components and targets after installing everything from the rust-toolchain file
1 parent 03aaf6b commit b065e5a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,19 @@ runs:
108108
# Install the toolchain as specified in the file
109109
# Might break at some point: https://github.com/rust-lang/rustup/issues/1397
110110
rustup show
111+
if [[ -n $components ]]; then
112+
rustup component add ${components//,/ }
113+
fi
114+
if [[ -n $targets ]]; then
115+
rustup target add ${targets//,/ }
116+
fi
111117
else
112118
rustup toolchain install ${{inputs.toolchain}}${{steps.flags.outputs.targets}}${{steps.flags.outputs.components}} --profile minimal${{steps.flags.outputs.downgrade}} --no-self-update
113119
rustup default ${{inputs.toolchain}}
114120
fi
121+
env:
122+
targets: ${{inputs.target}}
123+
components: ${{inputs.components}}
115124
shell: bash
116125

117126
- name: Print installed versions

0 commit comments

Comments
 (0)