job-application-agent 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/installer/src/runner.mjs +3 -2
- package/package.json +1 -1
package/installer/src/runner.mjs
CHANGED
|
@@ -8,15 +8,16 @@ function shellQuote(value) {
|
|
|
8
8
|
export async function createUpdateRunner({ platform = process.platform, codexHome, nodePath = process.execPath, npmCliPath }) {
|
|
9
9
|
if (!npmCliPath) throw new Error('npm CLI path is required to create the automatic-update runner.');
|
|
10
10
|
const managerDir = path.join(codexHome, 'job-application-agent');
|
|
11
|
+
const nodeDir = path.dirname(nodePath);
|
|
11
12
|
await mkdir(managerDir, { recursive: true });
|
|
12
13
|
if (platform === 'win32') {
|
|
13
14
|
const filePath = path.join(managerDir, 'update.cmd');
|
|
14
|
-
const script = `@echo off\r\nset "CODEX_HOME=${codexHome}"\r\n"${nodePath}" "${npmCliPath}" exec --yes --package=job-application-agent@latest -- job-application-agent auto-update\r\n`;
|
|
15
|
+
const script = `@echo off\r\nset "CODEX_HOME=${codexHome}"\r\nset "PATH=${nodeDir};%PATH%"\r\n"${nodePath}" "${npmCliPath}" exec --yes --package=job-application-agent@latest -- job-application-agent auto-update\r\n`;
|
|
15
16
|
await writeFile(filePath, script, { mode: 0o700 });
|
|
16
17
|
return { path: filePath };
|
|
17
18
|
}
|
|
18
19
|
const filePath = path.join(managerDir, 'update');
|
|
19
|
-
const script = `#!/bin/sh\nCODEX_HOME=${shellQuote(codexHome)}\nexport CODEX_HOME\nexec ${shellQuote(nodePath)} ${shellQuote(npmCliPath)} exec --yes --package=job-application-agent@latest -- job-application-agent auto-update\n`;
|
|
20
|
+
const script = `#!/bin/sh\nCODEX_HOME=${shellQuote(codexHome)}\nPATH=${shellQuote(nodeDir)}:\${PATH:-/usr/bin:/bin:/usr/sbin:/sbin}\nexport CODEX_HOME PATH\nexec ${shellQuote(nodePath)} ${shellQuote(npmCliPath)} exec --yes --package=job-application-agent@latest -- job-application-agent auto-update\n`;
|
|
20
21
|
await writeFile(filePath, script, { mode: 0o700 });
|
|
21
22
|
await chmod(filePath, 0o700);
|
|
22
23
|
return { path: filePath };
|
package/package.json
CHANGED