@aiyiran/myclaw 1.0.34 → 1.0.36
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/index.js +4 -0
- package/package.json +1 -1
- package/wsl2.js +15 -12
package/index.js
CHANGED
|
@@ -358,9 +358,11 @@ if not errorlevel 1 (
|
|
|
358
358
|
echo.
|
|
359
359
|
echo ============================================
|
|
360
360
|
echo OpenClaw 已在运行!浏览器已打开
|
|
361
|
+
echo 输入 exit 可关闭此窗口
|
|
361
362
|
echo ============================================
|
|
362
363
|
echo.
|
|
363
364
|
wsl -d OpenClaw
|
|
365
|
+
pause
|
|
364
366
|
exit /b
|
|
365
367
|
)
|
|
366
368
|
|
|
@@ -372,6 +374,8 @@ echo 关闭此窗口将停止服务
|
|
|
372
374
|
echo ============================================
|
|
373
375
|
echo.
|
|
374
376
|
wsl -d OpenClaw -- openclaw gateway
|
|
377
|
+
echo.
|
|
378
|
+
echo [!] Gateway 已退出
|
|
375
379
|
pause
|
|
376
380
|
`;
|
|
377
381
|
|
package/package.json
CHANGED
package/wsl2.js
CHANGED
|
@@ -402,9 +402,7 @@ function run() {
|
|
|
402
402
|
console.log('[' + C.b + 'MyClaw' + C.nc + '] WSL2 一键安装向导');
|
|
403
403
|
console.log(bar);
|
|
404
404
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
if (state === 'ready' && !forceReinstall) {
|
|
405
|
+
if (state === 'ready') {
|
|
408
406
|
console.log('');
|
|
409
407
|
console.log('[' + C.g + 'OK' + C.nc + '] WSL2 已完全安装就绪!');
|
|
410
408
|
console.log('');
|
|
@@ -417,16 +415,21 @@ function run() {
|
|
|
417
415
|
console.log('');
|
|
418
416
|
console.log('输入 ' + C.y + 'wsl' + C.nc + ' 即可进入 Linux 环境。');
|
|
419
417
|
console.log('');
|
|
420
|
-
console.log('如需重新安装 Linux 环境,运行:');
|
|
421
|
-
console.log(' ' + C.y + 'myclaw wsl2 --reinstall' + C.nc);
|
|
422
|
-
console.log('');
|
|
423
|
-
return;
|
|
424
|
-
}
|
|
425
418
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
419
|
+
// 询问是否重装
|
|
420
|
+
const readline = require('readline');
|
|
421
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
422
|
+
rl.question('是否要重新安装 Linux 环境? (y/N): ', (answer) => {
|
|
423
|
+
rl.close();
|
|
424
|
+
if (answer.trim().toLowerCase() === 'y') {
|
|
425
|
+
console.log('');
|
|
426
|
+
console.log('[' + C.y + '重装模式' + C.nc + '] 将重新导入 Linux 环境...');
|
|
427
|
+
runPhase2();
|
|
428
|
+
} else {
|
|
429
|
+
console.log('');
|
|
430
|
+
console.log('已取消。');
|
|
431
|
+
}
|
|
432
|
+
});
|
|
430
433
|
return;
|
|
431
434
|
}
|
|
432
435
|
|