From db1530cf0f86db0ea7c854a8dfb0046091951f35 Mon Sep 17 00:00:00 2001 From: Simone Date: Mon, 11 May 2026 18:40:19 +0200 Subject: [PATCH] fix(linux): correct PS escape for $GIT_CLONE_URL in UseGitClone clone cmd In PS double-quoted strings, backslash does NOT escape '$'. Only backtick does ('`$'). The previous '\' was being expanded as a PS variable (undefined), triggering StrictMode error: 'Cannot retrieve variable \ because it has not been set.' Replace '\$' with '`$' so the literal shell variable reference \ is emitted correctly to the SSH command. --- scripts/Invoke-RemoteBuild.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Invoke-RemoteBuild.ps1 b/scripts/Invoke-RemoteBuild.ps1 index b7d95a8..9d8b824 100644 --- a/scripts/Invoke-RemoteBuild.ps1 +++ b/scripts/Invoke-RemoteBuild.ps1 @@ -225,7 +225,7 @@ if ($GuestOS -eq 'Linux') { # PAT injected via env var inside SSH session — never in args $envCloneCmd = "export GIT_CLONE_URL='$cloneTargetUrl'; git clone --depth 1 --branch '$CloneBranch'" if ($CloneSubmodules) { $envCloneCmd += ' --recurse-submodules' } - $envCloneCmd += " `"`\$GIT_CLONE_URL`" '$GuestLinuxWorkDir'; unset GIT_CLONE_URL" + $envCloneCmd += " `"`$GIT_CLONE_URL`" '$GuestLinuxWorkDir'; unset GIT_CLONE_URL" Invoke-SshCommand -IP $IPAddress -User $SshUser -KeyPath $SshKeyPath -Command $envCloneCmd } else { Invoke-SshCommand -IP $IPAddress -User $SshUser -KeyPath $SshKeyPath -Command $cloneCmd