Skip to content

Commit a99166a

Browse files
committed
fix(ssh): keep $$ literal when embedding the remote runner
String.replaceAll treats $$ in a string replacement as an escaped $, so the runner embedded in the launch script wrote a literal $ as its archive-lock PID and never matched the runner the fixture expects.
1 parent aa2b453 commit a99166a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎packages/ssh/src/tunnel.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@ function applyScriptPlaceholders(
243243
): string {
244244
let result = template;
245245
for (const [token, value] of Object.entries(replacements)) {
246-
result = result.replaceAll(`@@${token}@@`, value);
246+
// A replacer function keeps `$$` and other `$` patterns in the value literal.
247+
result = result.replaceAll(`@@${token}@@`, () => value);
247248
}
248249
return result;
249250
}

0 commit comments

Comments
 (0)