Skip to content

Commit f89a806

Browse files
committed
Use the built-in working-directory selector and default to "." if rust-src-dir is not set
1 parent 5189717 commit f89a806

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

action.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,9 @@ runs:
211211
- id: versions
212212
name: Print installed versions
213213
shell: bash
214-
env:
215-
rust_src_dir: ${{inputs.rust-src-dir}}
214+
# Switch to the Rust sub-directory
215+
working-directory: ${{inputs.rust-src-dir || "."}}
216216
run: |
217-
# Switch to the selected sub-directory for
218-
cd "$rust_src_dir"
219-
220217
echo "rustc-version=$(rustc --version)" >> $GITHUB_OUTPUT
221218
rustc --version --verbose
222219
echo "cargo-version=$(cargo --version)" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)