Skip to content

Commit 0388f99

Browse files
committed
Pray bash works
1 parent 78d14ac commit 0388f99

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

ci/azure-install-rust.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,21 @@ steps:
1515
displayName: Install rust (unix)
1616
condition: ne( variables['Agent.OS'], 'Windows_NT' )
1717
18-
- powershell: |
19-
if (!$env:TOOLCHAIN) {
20-
$env:TOOLCHAIN = "stable-${env:TARGET}";
21-
}
22-
if ($env:RUSTUP_HOME) {
23-
rustup update --no-self-update $env:TOOLCHAIN
24-
rustup default $env:TOOLCHAIN
25-
} else {
18+
- bash: |
19+
set -e
20+
toolchain=$TOOLCHAIN
21+
if [ "$toolchain" = "" ]; then
22+
toolchain=stable-$TARGET
23+
fi
24+
if command -v rustup; then
25+
rustup update $toolchain
26+
rustup default $toolchain
27+
else
2628
curl.exe -sSf -o rustup-init.exe https://win.rustup.rs
2729
./rustup-init.exe -y --default-toolchain $env:TOOLCHAIN
28-
Write-Host "##vso[task.prependpath]${env:USERPROFILE}/.cargo/bin"
29-
}
30+
echo "##vso[task.prependpath]$USERPROFILE/.cargo/bin"
31+
fi
3032
displayName: Install rust (windows)
31-
failOnStderr: false
3233
condition: eq( variables['Agent.OS'], 'Windows_NT' )
3334
3435
- script: |

0 commit comments

Comments
 (0)