codewave-openclaw-installer 2.1.5 → 2.1.6

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.
@@ -71,7 +71,7 @@ export const CHANNEL_DEFINITIONS = {
71
71
  ? ['powershell', ['-Command', 'irm https://raw.githubusercontent.com/DingTalk-Real-AI/dingtalk-workspace-cli/main/scripts/install.ps1 | iex']]
72
72
  : ['sh', ['-c', 'curl -fsSL https://raw.githubusercontent.com/DingTalk-Real-AI/dingtalk-workspace-cli/main/scripts/install.sh | sh']],
73
73
  initCandidates: [
74
- ['dws', ['auth', 'login']],
74
+ ['dws', ['auth', 'login', '--force']],
75
75
  ['dingtalk', ['auth', 'login']],
76
76
  ['dingtalk-workspace-cli', ['auth', 'login']],
77
77
  ],
package/bin/install.mjs CHANGED
@@ -49,6 +49,10 @@ function resolveExecutable(cmd) {
49
49
  if (cmd === 'python3') return 'python.exe';
50
50
  return cmd;
51
51
  }
52
+
53
+ function shouldUseShell(executable) {
54
+ return isWin && /\.(cmd|bat)$/i.test(executable);
55
+ }
52
56
  const WINDOWS_UNINSTALL_KEYS = [
53
57
  'HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
54
58
  'HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
@@ -69,7 +73,7 @@ function run(cmd, args, opts = {}) {
69
73
  return Promise.resolve(0);
70
74
  }
71
75
  return new Promise((resolve) => {
72
- const child = spawn(executable, args, { stdio: 'inherit', shell: false, ...opts });
76
+ const child = spawn(executable, args, { stdio: 'inherit', shell: shouldUseShell(executable), ...opts });
73
77
  child.on('close', (code) => resolve(code ?? 1));
74
78
  child.on('error', (err) => {
75
79
  console.log(yellow(` ⚠ 进程启动失败: ${err.message}`));
@@ -81,7 +85,7 @@ function run(cmd, args, opts = {}) {
81
85
  function runCapture(cmd, args, opts = {}) {
82
86
  const executable = resolveExecutable(cmd);
83
87
  return new Promise((resolve) => {
84
- const child = spawn(executable, args, { stdio: ['ignore', 'pipe', 'pipe'], shell: false, ...opts });
88
+ const child = spawn(executable, args, { stdio: ['ignore', 'pipe', 'pipe'], shell: shouldUseShell(executable), ...opts });
85
89
  let stdout = '';
86
90
  let stderr = '';
87
91
  child.stdout?.on('data', (chunk) => { stdout += chunk.toString(); });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codewave-openclaw-installer",
3
- "version": "2.1.5",
3
+ "version": "2.1.6",
4
4
  "description": "网易智企 CodeWave OpenClaw 扩展:Skills + CLI 依赖一键安装",
5
5
  "type": "module",
6
6
  "main": "index.js",