From 0cda195f87354f2e39f40ead980006f2531de241 Mon Sep 17 00:00:00 2001 From: Ben Broderick Phillips Date: Wed, 1 Feb 2023 19:41:29 -0500 Subject: [PATCH] Handle multi-line string concatenation with Write-Warning --- 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 8e4e5e9d4f..49616b64b3 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.") } }