Skip to content

Commit 0ddce9f

Browse files
authored
Merge pull request #58 from maennchen/jm/windows-arm
2 parents 9399c7b + d9c91b2 commit 0ddce9f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

action.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,20 @@ runs:
130130
run: echo "::add-matcher::${{ github.action_path }}/rust.json"
131131

132132
- name: Install rustup, if needed
133-
if: runner.os != 'Windows'
134133
shell: bash
135134
run: |
136135
if ! command -v rustup &> /dev/null ; then
137136
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
138-
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
137+
138+
# Resolve the correct CARGO_HOME path depending on OS
139+
if [[ "$RUNNER_OS" == "Windows" ]]; then
140+
echo "${CARGO_HOME:-$USERPROFILE/.cargo}/bin" | sed 's|/|\\|g' >> $GITHUB_PATH
141+
else
142+
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
143+
fi
139144
fi
145+
env:
146+
RUNNER_OS: "${{ runner.os }}"
140147

141148
- name: rustup toolchain install ${{inputs.toolchain || 'stable'}}
142149
env:

0 commit comments

Comments
 (0)