Skip to content

Commit d8352f6

Browse files
committed
Move CARGO_HOME step in front of rustup install
1 parent 22eb75f commit d8352f6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

action.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,20 @@ runs:
5959
components: ${{inputs.components}}
6060
shell: bash
6161

62+
- run: |
63+
: set $CARGO_HOME
64+
echo CARGO_HOME=${CARGO_HOME:-${{runner.os == 'Windows' && '$USERPROFILE' || '$HOME'}}/.cargo} >> $GITHUB_ENV
65+
shell: bash
66+
6267
- run: |
6368
: install rustup if needed
6469
if ! command -v rustup &>/dev/null; then
6570
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
66-
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
71+
echo "$CARGO_HOME/bin" >> $GITHUB_PATH
6772
fi
6873
if: runner.os != 'Windows'
6974
shell: bash
7075
71-
- run: |
72-
: set $CARGO_HOME
73-
echo CARGO_HOME=${CARGO_HOME:-${{runner.os == 'Windows' && '$USERPROFILE' || '$HOME'}}/.cargo} >> $GITHUB_ENV
74-
shell: bash
75-
7676
- name: rustup toolchain install ${{steps.parse.outputs.toolchain}}
7777
run: rustup toolchain install ${{steps.parse.outputs.toolchain}}${{steps.flags.outputs.targets}}${{steps.flags.outputs.components}} --profile minimal${{steps.flags.outputs.downgrade}} --no-self-update
7878
shell: bash

0 commit comments

Comments
 (0)