yingclaw 2.1.7 → 2.1.8

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.js +5 -4
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -415,7 +415,7 @@ program
415
415
  console.log(await getBanner());
416
416
 
417
417
  try {
418
- const ver = execSync('claude --version 2>/dev/null', { encoding: 'utf8' }).trim();
418
+ const ver = execSync('claude --version', { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }).trim();
419
419
  console.log(chalk.green(`\n✔ Claude Code 已安装:${ver}\n`));
420
420
  const yes = await confirm({ message: '是否重新安装/更新?', default: false });
421
421
  if (!yes) return;
@@ -435,8 +435,8 @@ program
435
435
 
436
436
  console.log(chalk.dim('\n安装中,实时输出:\n'));
437
437
 
438
- // 实时输出安装日志
439
- const result = spawnSync(installCommand.command, installCommand.args, { stdio: 'inherit' });
438
+ // 实时输出安装日志(Windows 下 npm 是 npm.cmd,需要 shell: true 才能找到)
439
+ const result = spawnSync(installCommand.command, installCommand.args, { stdio: 'inherit', shell: process.platform === 'win32' });
440
440
 
441
441
  if (result.status === 0) {
442
442
  console.log(chalk.green('\n✔ Claude Code 安装成功!'));
@@ -870,7 +870,7 @@ program
870
870
  const upgradeCmd = { command: 'npm', args: upgradeArgs };
871
871
 
872
872
  console.log(chalk.dim('\n升级中...\n'));
873
- const result = spawnSync(upgradeCmd.command, upgradeCmd.args, { stdio: 'inherit' });
873
+ const result = spawnSync(upgradeCmd.command, upgradeCmd.args, { stdio: 'inherit', shell: process.platform === 'win32' });
874
874
 
875
875
  if (result.status === 0) {
876
876
  console.log(boxen(
@@ -1051,6 +1051,7 @@ async function runMenu() {
1051
1051
  const child = spawn('claude', [], {
1052
1052
  stdio: 'inherit',
1053
1053
  env: { ...process.env, ...buildClaudeEnv(cfg) },
1054
+ shell: process.platform === 'win32',
1054
1055
  });
1055
1056
  child.on('error', () => {
1056
1057
  console.log(chalk.yellow('\nClaude Code 未找到,请先选择"安装 Claude Code"'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yingclaw",
3
- "version": "2.1.7",
3
+ "version": "2.1.8",
4
4
  "description": "Claude Code × 国产大模型一键接入:DeepSeek、Kimi、Qwen、MiniMax、GLM、MiMo",
5
5
  "main": "index.js",
6
6
  "bin": {