From 3a55d32afebf76ccadbc6d7645fbf0d07cfbbaaa Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 2 Oct 2024 13:15:00 -0700 Subject: [PATCH] Update New-TestResources.ps1 to add quotes around shell envvar (#46377) Co-authored-by: swathipil --- eng/common/TestResources/New-TestResources.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/common/TestResources/New-TestResources.ps1 b/eng/common/TestResources/New-TestResources.ps1 index 6ccf55a781c1e..dbb8c4f20338c 100644 --- a/eng/common/TestResources/New-TestResources.ps1 +++ b/eng/common/TestResources/New-TestResources.ps1 @@ -515,9 +515,9 @@ try { # Try to detect the shell based on the parent process name (e.g. launch via shebang). $shell, $shellExportFormat = if (($parentProcessName = (Get-Process -Id $PID).Parent.ProcessName) -and $parentProcessName -eq 'cmd') { - 'cmd', 'set {0}={1}' + 'cmd', 'set {0}=''{1}''' } elseif (@('bash', 'csh', 'tcsh', 'zsh') -contains $parentProcessName) { - 'shell', 'export {0}={1}' + 'shell', 'export {0}=''{1}''' } else { 'PowerShell', '${{env:{0}}} = ''{1}''' }