cursor-switch 1.0.3 → 1.0.4

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.
@@ -197,9 +197,12 @@ export class UpdateChecker {
197
197
  return new Promise((resolve) => {
198
198
  let stderrOutput = '';
199
199
  let stdoutOutput = '';
200
- const child = spawn(pm.cmd, pm.args, {
200
+ const isWin = process.platform === 'win32';
201
+ const cmdToRun = isWin ? `${pm.cmd} ${pm.args.join(' ')}` : pm.cmd;
202
+ const argsToRun = isWin ? [] : pm.args;
203
+ const child = spawn(cmdToRun, argsToRun, {
201
204
  stdio: ['ignore', 'pipe', 'pipe'],
202
- shell: process.platform === 'win32',
205
+ shell: isWin,
203
206
  });
204
207
  child.stdout?.on('data', (chunk) => {
205
208
  const text = chunk.toString();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cursor-switch",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "极速、安全、纯本地运行的 Cursor IDE 多账号管理与防封虚拟机器指纹切换纯命令行工具",
5
5
  "author": "aozai",
6
6
  "license": "MIT",