Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(ssh): record the archive lock owner's real PID #14598

MergedGigioxx(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/14598/headmerged by maria-rcks View on GitHub

Showing 2 changed files with 8 additions and 1 deletion.

x
0 of 2 viewed, 2 left
6 additions and 0 deletionspackages/ssh/src/tunnel.test.tsModified
View file
@@ -242,6 +242,12 @@
assert.notInclude(script, "npx");
});
​
+ it("embeds the runner in the launch script byte for byte", () => {
+ const runner = buildRemoteT3RunnerScript(ARCHIVE);
+ assert.include(runner, 'printf \'%s\\n\' "$$" > "$T3_LOCK/pid.tmp"');
+ assert.include(buildRemoteLaunchScript(ARCHIVE), runner);
+ });
+​
it("uses the remote t3 runner for launch and pairing scripts", () => {
const target = {
alias: "devbox",
2 additions and 1 deletionpackages/ssh/src/tunnel.tsModified
View file
@@ -243,7 +243,8 @@
): string {
let result = template;
for (const [token, value] of Object.entries(replacements)) {
- result = result.replaceAll(`@@${token}@@`, value);
+ // A replacer function keeps `$$` and other `$` patterns in the value literal.
+ result = result.replaceAll(`@@${token}@@`, () => value);
return result;