Skip to content

Commit 2c5b5af

Browse files
committed
More tweaks to install task
1 parent 4b32d51 commit 2c5b5af

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

ci/azure-install-rust.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,16 @@ steps:
1515
displayName: Install rust (unix)
1616
condition: ne( variables['Agent.OS'], 'Windows_NT' )
1717
18-
- bash: rustup update --no-self-update stable-$TARGET && rustup default stable-$TARGET
18+
- bash: |
19+
set -e
20+
if command -v rustup; then
21+
rustup update --no-self-update stable-$TARGET
22+
rustup default stable-$TARGET
23+
else
24+
curl.exe -sSf -o rustup-init.exe https://win.rustup.rs
25+
./rustup-init.exe -y --default-toolchain stable-$TARGET
26+
echo "##vso[task.prependpath]$USERPROFILE/.cargo/bin"
27+
fi
1928
displayName: Install rust (windows)
2029
condition: eq( variables['Agent.OS'], 'Windows_NT' )
2130

0 commit comments

Comments
 (0)