@aiyiran/myclaw 1.0.21 → 1.0.22

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/package.json +1 -1
  2. package/wsl2.js +13 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
package/wsl2.js CHANGED
@@ -402,7 +402,9 @@ function run() {
402
402
  console.log('[' + C.b + 'MyClaw' + C.nc + '] WSL2 一键安装向导');
403
403
  console.log(bar);
404
404
 
405
- if (state === 'ready') {
405
+ const forceReinstall = process.argv.includes('--reinstall');
406
+
407
+ if (state === 'ready' && !forceReinstall) {
406
408
  console.log('');
407
409
  console.log('[' + C.g + 'OK' + C.nc + '] WSL2 已完全安装就绪!');
408
410
  console.log('');
@@ -415,6 +417,16 @@ function run() {
415
417
  console.log('');
416
418
  console.log('输入 ' + C.y + 'wsl' + C.nc + ' 即可进入 Linux 环境。');
417
419
  console.log('');
420
+ console.log('如需重新安装 Linux 环境,运行:');
421
+ console.log(' ' + C.y + 'myclaw wsl2 --reinstall' + C.nc);
422
+ console.log('');
423
+ return;
424
+ }
425
+
426
+ if (state === 'ready' && forceReinstall) {
427
+ console.log('');
428
+ console.log('[' + C.y + '重装模式' + C.nc + '] 将重新导入 Linux 环境...');
429
+ runPhase2();
418
430
  return;
419
431
  }
420
432