From 13cbe57ee4c94a22f93775f8d0d49bfb6616a819 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:09 -0800 Subject: [PATCH] Handle multi-line string concatenation with Write-Warning (#1464) Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com> --- 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 8e4e5e9d4..49616b64b 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.") } }