File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ Afterward, the `components` and `target` specified via inputs are installed in a
66
66
| `matcher` | Enable problem matcher to surface build messages and formatting issues | true |
67
67
| `rustflags` | Set the value of `RUSTFLAGS` (set to empty string to avoid overwriting existing flags) | "-D warnings" |
68
68
| `override` | Setup the last installed toolchain as the default via `rustup override` | true |
69
- | `rust-toolchain -dir` | Path from root directory to directory with the rust toolchain file (if its not in the root of the repository) | |
69
+ | `rust-src -dir` | Path from root directory to directory with the Rust source directory (if its not in the root of the repository) | |
70
70
71
71
[`Swatinem/rust-cache`] : https://github.com/Swatinem/rust-cache
72
72
Original file line number Diff line number Diff line change @@ -69,8 +69,8 @@ inputs:
69
69
description : " Setup the last installed toolchain as the default via `rustup override`"
70
70
required : false
71
71
default : " true"
72
- rust-toolchain -dir :
73
- description : " Specify path from root directory to the directory to search for rust-toolchain.toml file . By default root directory will be used."
72
+ rust-src -dir :
73
+ description : " Specify path from root directory to the Rust source directory . By default root directory will be used."
74
74
required : false
75
75
76
76
outputs :
@@ -166,18 +166,18 @@ runs:
166
166
targets : ${{inputs.target}}
167
167
components : ${{inputs.components}}
168
168
override : ${{inputs.override}}
169
- rust_toolchain_dir : ${{inputs.rust-toolchain -dir}}
169
+ rust_src_dir : ${{inputs.rust-src -dir}}
170
170
shell : bash
171
171
run : |
172
- if [[ -z "$toolchain" && ( -f "rust-toolchain" || -f "rust-toolchain.toml" || -f "$rust_toolchain_dir/rust-toolchain.toml") ]]
172
+ if [[ -d "$rust_src_dir ]]; then
173
+ cd "$rust_src_dir"
174
+ fi
175
+ if [[ -z "$toolchain" && ( -f "rust-toolchain" || -f "rust-toolchain.toml") ]]
173
176
then
174
177
# Install the toolchain as specified in the file
175
178
# rustup show is the old way that implicitly installed a toolchain
176
179
# rustup toolchain install is the new explicit way
177
180
# https://github.com/rust-lang/rustup/issues/3635#issuecomment-2343511297
178
- if [[ -n "$rust_toolchain_dir" ]]; then
179
- cd "$rust_toolchain_dir"
180
- fi
181
181
rustup show active-toolchain || rustup toolchain install
182
182
if [[ -n $components ]]; then
183
183
rustup component add ${components//,/ }
You can’t perform that action at this time.
0 commit comments