Skip to content

Commit 11e4edb

Browse files
committed
Attempt to fix CI
1 parent 6fd68bb commit 11e4edb

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

ci/azure-install-rust.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,20 @@ steps:
55
if [ "$toolchain" = "" ]; then
66
toolchain=stable
77
fi
8-
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $toolchain
9-
echo "##vso[task.prependpath]$HOME/.cargo/bin"
8+
if command -v rustup; then
9+
rustup update $toolchain
10+
rustup default $toolchain
11+
else
12+
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $toolchain
13+
echo "##vso[task.prependpath]$HOME/.cargo/bin"
14+
fi
1015
displayName: Install rust (unix)
1116
condition: ne( variables['Agent.OS'], 'Windows_NT' )
1217
1318
- script: |
1419
IF "%TOOLCHAIN%"=="" (SET TOOLCHAIN=stable-%TARGET%)
15-
curl -sSf -o rustup-init.exe https://win.rustup.rs
16-
rustup-init.exe -y --default-toolchain %TOOLCHAIN%
17-
echo ##vso[task.prependpath]%USERPROFILE%\.cargo\bin
20+
rustup update %TOOLCHAIN%
21+
rustup default %TOOLCHAIN%
1822
displayName: Install rust (windows)
1923
condition: eq( variables['Agent.OS'], 'Windows_NT' )
2024

0 commit comments

Comments
 (0)