mirror of
https://github.com/actions-rust-lang/setup-rust-toolchain.git
synced 2025-07-04 20:41:12 +00:00
Merge pull request #58 from maennchen/jm/windows-arm
This commit is contained in:
commit
0ddce9f632
1 changed files with 9 additions and 2 deletions
11
action.yml
11
action.yml
|
@ -130,13 +130,20 @@ runs:
|
||||||
run: echo "::add-matcher::${{ github.action_path }}/rust.json"
|
run: echo "::add-matcher::${{ github.action_path }}/rust.json"
|
||||||
|
|
||||||
- name: Install rustup, if needed
|
- name: Install rustup, if needed
|
||||||
if: runner.os != 'Windows'
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if ! command -v rustup &> /dev/null ; then
|
if ! command -v rustup &> /dev/null ; then
|
||||||
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
|
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
|
||||||
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
|
|
||||||
|
# Resolve the correct CARGO_HOME path depending on OS
|
||||||
|
if [[ "$RUNNER_OS" == "Windows" ]]; then
|
||||||
|
echo "${CARGO_HOME:-$USERPROFILE/.cargo}/bin" | sed 's|/|\\|g' >> $GITHUB_PATH
|
||||||
|
else
|
||||||
|
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
env:
|
||||||
|
RUNNER_OS: "${{ runner.os }}"
|
||||||
|
|
||||||
- name: rustup toolchain install ${{inputs.toolchain || 'stable'}}
|
- name: rustup toolchain install ${{inputs.toolchain || 'stable'}}
|
||||||
env:
|
env:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue