Fix CI for runners with powershell 7 (#8245)

This commit is contained in:
Alexey-Ayupov
2023-09-07 12:51:50 +02:00
committed by GitHub
parent b59fd09847
commit 452c8ec89f

View File

@@ -95,8 +95,12 @@ $targetKey = az storage account keys list `
Write-Host ("Copying VHD blob from '{0}' to 'https://{1}.blob.core.windows.net/{2}/{3}'..." ` Write-Host ("Copying VHD blob from '{0}' to 'https://{1}.blob.core.windows.net/{2}/{3}'..." `
-f $sourceDiskUri.Split('?')[0], $StorageAccountName, $StorageAccountContainerName, $VhdName) -f $sourceDiskUri.Split('?')[0], $StorageAccountName, $StorageAccountContainerName, $VhdName)
if ($env:OS) {
$sourceDiskUri = """{0}""" -f $sourceDiskUri
}
az storage blob copy start ` az storage blob copy start `
--source-uri """$sourceDiskUri""" ` --source-uri $sourceDiskUri `
--destination-blob $VhdName ` --destination-blob $VhdName `
--destination-container $StorageAccountContainerName ` --destination-container $StorageAccountContainerName `
--account-name $StorageAccountName ` --account-name $StorageAccountName `