Skip to content

Commit 0292085

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
don't update rust if used in ADO
1 parent b04bf4a commit 0292085

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

build.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ param(
2525

2626
$env:RUSTC_LOG=$null
2727
$env:RUSTFLAGS='-Dwarnings'
28+
$usingADO = ($null -ne $env:TF_BUILD)
2829

2930
trap {
3031
Write-Error "An error occurred: $($_ | Out-String)"
@@ -184,7 +185,7 @@ if ($null -ne $packageType) {
184185
Remove-Item temp:/rustup-init.exe -ErrorAction Ignore
185186
}
186187
}
187-
else {
188+
elseif (!$usingADO) {
188189
Write-Verbose -Verbose "Rust found, updating..."
189190
& $rustup update
190191
}
@@ -500,8 +501,6 @@ if (!$Clippy -and !$SkipBuild) {
500501

501502
if ($Test) {
502503
$failed = $false
503-
504-
$usingADO = ($null -ne $env:TF_BUILD)
505504
$repository = 'PSGallery'
506505

507506
if ($usingADO) {

0 commit comments

Comments
 (0)