File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -195,9 +195,7 @@ if (!$SkipBuild) {
195
195
throw " Azure CLI not found"
196
196
}
197
197
198
- if ($null -ne $env: CARGO_REGISTRIES_POWERSHELL_TOKEN ) {
199
- Write-Host " Using existing token"
200
- } else {
198
+ if ($null -ne (Get-Command az - ErrorAction Ignore)) {
201
199
Write-Host " Getting token"
202
200
$accessToken = az account get-access - token -- query accessToken -- resource 499b84ac- 1321 - 427f - aa17- 267ca6975798 - o tsv
203
201
if ($LASTEXITCODE -ne 0 ) {
@@ -208,6 +206,9 @@ if (!$SkipBuild) {
208
206
$env: CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER = ' cargo:token'
209
207
}
210
208
}
209
+ else {
210
+ Write-Warning " Azure CLI not found, proceeding with anonymous access."
211
+ }
211
212
}
212
213
213
214
# make sure dependencies are built first so clippy runs correctly
You can’t perform that action at this time.
0 commit comments