File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -15,20 +15,21 @@ steps:
15
15
displayName: Install rust (unix)
16
16
condition: ne( variables['Agent.OS'], 'Windows_NT' )
17
17
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
26
28
curl.exe -sSf -o rustup-init.exe https://win.rustup.rs
27
29
./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
30
32
displayName: Install rust (windows)
31
- failOnStderr: false
32
33
condition: eq( variables['Agent.OS'], 'Windows_NT' )
33
34
34
35
- script : |
You can’t perform that action at this time.
0 commit comments