cicy-code 0.2.9 → 0.2.11
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/bin/cicy-code.js +4 -2
- package/package.json +1 -1
package/bin/cicy-code.js
CHANGED
|
@@ -136,11 +136,13 @@ async function launchDesktop() {
|
|
|
136
136
|
|
|
137
137
|
// 1. Start API server in background
|
|
138
138
|
const serverArgs = process.argv.slice(2).filter(a => a !== '--desktop');
|
|
139
|
-
const
|
|
139
|
+
const isWin = process.platform === 'win32';
|
|
140
|
+
const server = spawn(isWin ? binPath : 'nohup', isWin ? serverArgs : [binPath, ...serverArgs], {
|
|
140
141
|
stdio: 'ignore',
|
|
141
142
|
detached: true,
|
|
142
|
-
env: { ...process.env, CICY_NO_BROWSER: '1' }
|
|
143
|
+
env: { ...process.env, CICY_NO_BROWSER: '1', TERM: process.env.TERM || 'xterm-256color' }
|
|
143
144
|
});
|
|
145
|
+
server.on('exit', (code, signal) => console.error(` ⚠️ Server exited code=${code} signal=${signal}`));
|
|
144
146
|
server.unref();
|
|
145
147
|
console.log(` 🚀 Starting cicy-code server (PID: ${server.pid})...`);
|
|
146
148
|
|