File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff 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 :
You can’t perform that action at this time.
0 commit comments