neoagent 1.1.1 → 1.1.2
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/lib/manager.js +11 -1
- package/package.json +1 -1
package/lib/manager.js
CHANGED
|
@@ -403,7 +403,17 @@ function cmdUpdate() {
|
|
|
403
403
|
logOk('Already up to date');
|
|
404
404
|
}
|
|
405
405
|
} else {
|
|
406
|
-
logWarn('No git repo detected;
|
|
406
|
+
logWarn('No git repo detected; attempting npm global update.');
|
|
407
|
+
if (commandExists('npm')) {
|
|
408
|
+
try {
|
|
409
|
+
runOrThrow('npm', ['update', '-g', 'neoagent']);
|
|
410
|
+
logOk('npm global update completed');
|
|
411
|
+
} catch {
|
|
412
|
+
logWarn('npm global update failed. Run: npm update -g neoagent');
|
|
413
|
+
}
|
|
414
|
+
} else {
|
|
415
|
+
logWarn('npm not found. Cannot perform global update.');
|
|
416
|
+
}
|
|
407
417
|
}
|
|
408
418
|
|
|
409
419
|
cmdRestart();
|