File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -4,17 +4,21 @@ parameters:
44steps :
55 - bash : |
66 set -e
7- curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TOOLCHAIN
8- echo "##vso[task.prependpath]$HOME/.cargo/bin"
7+ if command -v rustup; then
8+ rustup update $TOOLCHAIN
9+ rustup default $TOOLCHAIN
10+ else
11+ curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TOOLCHAIN
12+ echo "##vso[task.prependpath]$HOME/.cargo/bin"
13+ fi
914 displayName: Install rust
1015 condition: ne( variables['Agent.OS'], 'Windows_NT' )
1116 env:
1217 TOOLCHAIN: ${{ parameters.toolchain }}
1318
1419 - script : |
15- curl -sSf -o rustup-init.exe https://win.rustup.rs
16- rustup-init.exe -y --default-toolchain %TOOLCHAIN%-%TARGET%
17- echo ##vso[task.prependpath]%USERPROFILE%\.cargo\bin
20+ rustup update --no-self-update %TOOLCHAIN%-%TARGET%
21+ rustup default %TOOLCHAIN%-%TARGET%
1822 displayName: Install rust
1923 condition: eq( variables['Agent.OS'], 'Windows_NT' )
2024 env:
You can’t perform that action at this time.
0 commit comments