Skip to content

Commit 20827ad

Browse files
committed
Attempt to fix CI
1 parent 43bd899 commit 20827ad

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
@@ -4,17 +4,21 @@ parameters:
44
steps:
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:

0 commit comments

Comments
 (0)