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.
Files changed (2) hide show
  1. package/bin/cli.mjs +8 -3
  2. 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
- // Unix: 使用 script 命令伪造 TTY
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclawsetup",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "OpenClaw 智能安装向导 - 调用官方交互界面,自动选择推荐配置",
5
5
  "type": "module",
6
6
  "bin": {