@simonyea/holysheep-cli 1.7.81 → 1.7.82

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonyea/holysheep-cli",
3
- "version": "1.7.81",
3
+ "version": "1.7.82",
4
4
  "description": "Claude Code/Cursor/Cline API relay for China — ¥1=$1, WeChat/Alipay payment, no credit card, no VPN. One command setup for all AI coding tools.",
5
5
  "keywords": [
6
6
  "openai-china",
@@ -583,6 +583,15 @@ async function handleToolUpgrade(req, res) {
583
583
  } catch {}
584
584
 
585
585
  sseEmit(res, { type: 'progress', message: `${entry.name} 当前版本: ${localVer || '未知'}` })
586
+
587
+ // Windows:升级前先 kill 正在运行的进程,避免文件被占用导致安装失败
588
+ if (process.platform === 'win32' && entry.command) {
589
+ try {
590
+ execSync(`taskkill /F /IM ${entry.command}.exe /T`, { stdio: 'ignore', shell: true })
591
+ sseEmit(res, { type: 'progress', message: `已关闭正在运行的 ${entry.name} 进程` })
592
+ } catch {}
593
+ }
594
+
586
595
  sseEmit(res, { type: 'progress', message: `正在升级 ${entry.name}...` })
587
596
 
588
597
  const ok = await new Promise(resolve => {