openclawsetup 2.0.0 → 2.0.1
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/cli.mjs +8 -3
- package/package.json +1 -1
package/bin/cli.mjs
CHANGED
|
@@ -244,13 +244,18 @@ async function runOnboardWithAutoResponse(cliName, options) {
|
|
|
244
244
|
shell: true,
|
|
245
245
|
env: { ...process.env, FORCE_COLOR: '1', TERM: 'xterm-256color' },
|
|
246
246
|
});
|
|
247
|
-
} else {
|
|
248
|
-
//
|
|
249
|
-
// script -q /dev/null <command> 可以创建伪终端
|
|
247
|
+
} else if (os === 'darwin') {
|
|
248
|
+
// macOS: script -q /dev/null command args...
|
|
250
249
|
child = spawn('script', ['-q', '/dev/null', cliName, 'onboard', '--install-daemon'], {
|
|
251
250
|
stdio: options.manual ? 'inherit' : ['pipe', 'pipe', 'pipe'],
|
|
252
251
|
env: { ...process.env, FORCE_COLOR: '1', TERM: 'xterm-256color' },
|
|
253
252
|
});
|
|
253
|
+
} else {
|
|
254
|
+
// Linux: script -q -c "command args..." /dev/null
|
|
255
|
+
child = spawn('script', ['-q', '-c', `${cliName} onboard --install-daemon`, '/dev/null'], {
|
|
256
|
+
stdio: options.manual ? 'inherit' : ['pipe', 'pipe', 'pipe'],
|
|
257
|
+
env: { ...process.env, FORCE_COLOR: '1', TERM: 'xterm-256color' },
|
|
258
|
+
});
|
|
254
259
|
}
|
|
255
260
|
|
|
256
261
|
if (options.manual) {
|