-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcodlogs.cjs
More file actions
29 lines (24 loc) · 673 Bytes
/
codlogs.cjs
File metadata and controls
29 lines (24 loc) · 673 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env node
const childProcess = require("node:child_process");
const path = require("node:path");
const scriptPath = path.join(__dirname, "codlogs-sessions.ts");
const result = childProcess.spawnSync(
process.execPath,
["--no-warnings", "--experimental-strip-types", scriptPath, ...process.argv.slice(2)],
{
env: {
...process.env,
CODEXER_COMMAND_NAME: "codlogs",
},
stdio: "inherit",
windowsHide: false,
},
);
if (result.error) {
console.error(`Failed to launch codlogs: ${result.error.message}`);
process.exit(1);
}
if (result.signal) {
process.kill(process.pid, result.signal);
}
process.exit(result.status ?? 1);