mirror of
https://github.com/actions/runner-images.git
synced 2025-12-17 15:20:11 +00:00
[Ubuntu] fix software report for azure-cli (#4379)
This commit is contained in:
@@ -196,13 +196,13 @@ function Get-JqVersion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Get-AzureCliVersion {
|
function Get-AzureCliVersion {
|
||||||
$azcliVersion = az -v | Select-String "azure-cli" | Take-OutputPart -Part -1
|
$azcliVersion = (az version | ConvertFrom-Json).'azure-cli'
|
||||||
$aptSourceRepo = Get-AptSourceRepository -PackageName "azure-cli"
|
$aptSourceRepo = Get-AptSourceRepository -PackageName "azure-cli"
|
||||||
return "Azure CLI (azure-cli) $azcliVersion (installation method: $aptSourceRepo)"
|
return "Azure CLI (azure-cli) $azcliVersion (installation method: $aptSourceRepo)"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-AzureDevopsVersion {
|
function Get-AzureDevopsVersion {
|
||||||
$azdevopsVersion = az -v | Select-String "azure-devops" | Take-OutputPart -Part -1
|
$azdevopsVersion = (az version | ConvertFrom-Json).extensions.'azure-devops'
|
||||||
return "Azure CLI (azure-devops) $azdevopsVersion"
|
return "Azure CLI (azure-devops) $azdevopsVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user