cursor-switch 1.0.3 → 1.0.5
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
|
|
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:
|
|
205
|
+
shell: isWin,
|
|
203
206
|
});
|
|
204
207
|
child.stdout?.on('data', (chunk) => {
|
|
205
208
|
const text = chunk.toString();
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cursor-switch",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "极速、安全、纯本地运行的 Cursor IDE 多账号管理与防封虚拟机器指纹切换纯命令行工具",
|
|
5
5
|
"author": "aozai",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./dist/index.js",
|
|
9
9
|
"bin": {
|
|
10
|
+
"switch": "bin/cswitch.js",
|
|
10
11
|
"cswitch": "bin/cswitch.js",
|
|
11
12
|
"cursor-switch": "bin/cswitch.js"
|
|
12
13
|
},
|