From 5053f6571e1a710052942f078f49e69839b0d1a2 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 1 Feb 2023 17:47:07 -0800 Subject: [PATCH] Handle multi-line string concatenation with Write-Warning (#19930) Co-authored-by: Ben Broderick Phillips --- eng/common/TestResources/New-TestResources.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/common/TestResources/New-TestResources.ps1 b/eng/common/TestResources/New-TestResources.ps1 index 8e4e5e9d4f78..49616b64b335 100644 --- a/eng/common/TestResources/New-TestResources.ps1 +++ b/eng/common/TestResources/New-TestResources.ps1 @@ -652,8 +652,8 @@ try { } } catch { - Write-Warning "The Object ID of the test application was unable to be queried. " + ` - "You may want to consider passing it explicitly with the 'TestApplicationOid` parameter." + Write-Warning ("The Object ID of the test application was unable to be queried. " + + "You may want to consider passing it explicitly with the 'TestApplicationOid` parameter.") throw $_.Exception } @@ -693,9 +693,9 @@ try { if ($principalOwnerAssignment.RoleDefinitionName -eq 'Owner') { Write-Verbose "Successfully assigned ownership of '$ResourceGroupName' to the Test Application '$TestApplicationId'" } else { - Write-Warning "The 'Owner' role for '$ResourceGroupName' could not be assigned. " + ` - "You may need to manually grant 'Owner' for the resource group to the " + ` - "Test Application '$TestApplicationId' if it does not have subscription-level permissions." + Write-Warning ("The 'Owner' role for '$ResourceGroupName' could not be assigned. " + + "You may need to manually grant 'Owner' for the resource group to the " + + "Test Application '$TestApplicationId' if it does not have subscription-level permissions.") } }