Use the built-in working-directory selector and default to "." if rust-src-dir is not set

This commit is contained in:
Jonas Bushart
2025-10-04 13:06:57 +02:00
parent 51897173ae
commit f89a806691

View File

@@ -211,12 +211,9 @@ runs:
- id: versions - id: versions
name: Print installed versions name: Print installed versions
shell: bash shell: bash
env: # Switch to the Rust sub-directory
rust_src_dir: ${{inputs.rust-src-dir}} working-directory: ${{inputs.rust-src-dir || "."}}
run: | run: |
# Switch to the selected sub-directory for
cd "$rust_src_dir"
echo "rustc-version=$(rustc --version)" >> $GITHUB_OUTPUT echo "rustc-version=$(rustc --version)" >> $GITHUB_OUTPUT
rustc --version --verbose rustc --version --verbose
echo "cargo-version=$(cargo --version)" >> $GITHUB_OUTPUT echo "cargo-version=$(cargo --version)" >> $GITHUB_OUTPUT