fix(desktop): restore packaged terminal hooks
The desktop daemon resolved the CLI through a packaged module entrypoint that is not an executable outside the archive. Publish the existing bundled shim as the daemon's authoritative CLI path so terminal hooks use a callable command.
This commit is contained in:
@@ -128,6 +128,14 @@ function shellQuoteCliArg(value) {
|
||||
return shellQuote(String(value));
|
||||
}
|
||||
|
||||
function getTerminalHookSmokeCommand(marker) {
|
||||
if (process.platform === "win32") {
|
||||
return `"%PASEO_HOOK_CLI%" hooks codex Stop && echo ${marker}`;
|
||||
}
|
||||
|
||||
return `"$PASEO_HOOK_CLI" hooks codex Stop && echo ${marker}`;
|
||||
}
|
||||
|
||||
function getShellCommand(script) {
|
||||
if (process.platform === "win32") {
|
||||
return {
|
||||
@@ -740,8 +748,8 @@ async function smokeCliTerminal({ appPath, env }) {
|
||||
await runCliShimJsonCommand({
|
||||
appPath,
|
||||
env,
|
||||
args: ["terminal", "send-keys", terminalId, "echo", "Space", marker, "Enter"],
|
||||
label: "Bundled CLI shim terminal send-keys",
|
||||
args: ["terminal", "send-keys", terminalId, getTerminalHookSmokeCommand(marker), "Enter"],
|
||||
label: "Bundled CLI shim terminal hook command",
|
||||
});
|
||||
|
||||
for (let attempt = 1; attempt <= TERMINAL_CAPTURE_ATTEMPTS; attempt += 1) {
|
||||
@@ -753,7 +761,7 @@ async function smokeCliTerminal({ appPath, env }) {
|
||||
});
|
||||
const lines = Array.isArray(capture?.lines) ? capture.lines : [];
|
||||
if (lines.join("\n").includes(marker)) {
|
||||
console.log("Packaged desktop smoke: terminal command output captured");
|
||||
console.log("Packaged desktop smoke: terminal hook command completed");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user