File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -130,13 +130,20 @@ runs:
130
130
run : echo "::add-matcher::${{ github.action_path }}/rust.json"
131
131
132
132
- name : Install rustup, if needed
133
- if : runner.os != 'Windows'
134
133
shell : bash
135
134
run : |
136
135
if ! command -v rustup &> /dev/null ; then
137
136
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
139
144
fi
145
+ env :
146
+ RUNNER_OS : " ${{ runner.os }}"
140
147
141
148
- name : rustup toolchain install ${{inputs.toolchain || 'stable'}}
142
149
env :
You can’t perform that action at this time.
0 commit comments