Skip to content

Commit 1c090fc

Browse files
authored
Use cargo read-manifest to get rust_version from core (#2278)
1 parent 59efcce commit 1c090fc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

eng/pipelines/templates/steps/use-rust.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ steps:
1111
$toolchain = '${{ parameters.Toolchain }}'
1212
if ($toolchain -eq 'msrv') {
1313
Write-Host "Reading MSRV from azure_core"
14-
$toolchain = cargo metadata --manifest-path ./sdk/core/azure_core/Cargo.toml --format-version 1 | convertfrom-json | select -expand packages | where { $_.name -eq 'azure_core' } | select -expand rust_version
14+
$toolchain = cargo read-manifest --manifest-path ./sdk/core/azure_core/Cargo.toml | ConvertFrom-Json | Select-Object -ExpandProperty rust_version
1515
}
1616
1717
Write-Host "Setting Toolchain variable to $toolchain"
@@ -24,10 +24,10 @@ steps:
2424
$attempts++
2525
Write-Host "> rustup toolchain install --no-self-update $toolchain"
2626
rustup toolchain install --no-self-update $toolchain
27-
27+
2828
if ($?) { exit 0 }
2929
30-
if ($attempts -lt $maxAttempts) {
30+
if ($attempts -lt $maxAttempts) {
3131
Write-Host "Failed to install $toolchain, attempt $attempts, retrying..."
3232
} else {
3333
Write-Host "Failed to install $toolchain after $attempts attempts."

0 commit comments

Comments
 (0)