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:
4
4
steps :
5
5
- bash : |
6
6
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
9
14
displayName: Install rust
10
15
condition: ne( variables['Agent.OS'], 'Windows_NT' )
11
16
env:
12
17
TOOLCHAIN: ${{ parameters.toolchain }}
13
18
14
19
- 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%
18
22
displayName: Install rust
19
23
condition: eq( variables['Agent.OS'], 'Windows_NT' )
20
24
env:
You can’t perform that action at this time.
0 commit comments