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:
Mohamed Boudra
2026-07-21 17:55:13 +02:00
parent 0707092131
commit ee431bb340
9 changed files with 39 additions and 17 deletions
+7 -7
View File
@@ -308,16 +308,16 @@ function resolveExternalProcessPath(filePath: string): string {
}
export function resolvePaseoCliBinDir(): string | null {
const cliEntrypoint = resolvePaseoCliBinEntrypoint();
if (!cliEntrypoint) {
return null;
}
const externalCliEntrypoint = resolveExternalProcessPath(cliEntrypoint);
return findNpmBinDir(dirname(externalCliEntrypoint)) ?? dirname(externalCliEntrypoint);
const cliExecutable = resolvePaseoCliExecutablePath();
return cliExecutable ? dirname(cliExecutable) : null;
}
export function resolvePaseoCliExecutablePath(): string | null {
const configuredCli = process.env.PASEO_CLI?.trim();
if (configuredCli) {
return resolvePath(configuredCli);
}
const cliEntrypoint = resolvePaseoCliBinEntrypoint();
if (!cliEntrypoint) {
return null;