@ghl-ai/aw 0.1.13 → 0.1.14
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/commands/nuke.mjs +21 -1
- package/package.json +1 -1
package/commands/nuke.mjs
CHANGED
|
@@ -211,7 +211,27 @@ export function nukeCommand(args) {
|
|
|
211
211
|
fmt.logStep('Removed ~/.aw_docs/');
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
// 7. Remove
|
|
214
|
+
// 7. Remove any manual `aw` symlinks (e.g. ~/.local/bin/aw)
|
|
215
|
+
const manualBins = [
|
|
216
|
+
join(HOME, '.local', 'bin', 'aw'),
|
|
217
|
+
join(HOME, 'bin', 'aw'),
|
|
218
|
+
];
|
|
219
|
+
for (const bin of manualBins) {
|
|
220
|
+
try {
|
|
221
|
+
if (lstatSync(bin).isSymbolicLink()) {
|
|
222
|
+
unlinkSync(bin);
|
|
223
|
+
fmt.logStep(`Removed manual symlink ${bin.replace(HOME, '~')}`);
|
|
224
|
+
}
|
|
225
|
+
} catch { /* doesn't exist */ }
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// 8. Uninstall npm global package
|
|
229
|
+
try {
|
|
230
|
+
execSync('npm uninstall -g @ghl-ai/aw', { stdio: 'pipe', timeout: 15000 });
|
|
231
|
+
fmt.logStep('Uninstalled @ghl-ai/aw globally');
|
|
232
|
+
} catch { /* not installed via npm or no permissions */ }
|
|
233
|
+
|
|
234
|
+
// 9. Remove ~/.aw_registry/ itself (source of truth — last!)
|
|
215
235
|
rmSync(GLOBAL_AW_DIR, { recursive: true, force: true });
|
|
216
236
|
fmt.logStep('Removed ~/.aw_registry/');
|
|
217
237
|
|