@ghl-ai/aw 0.1.36-beta.44 → 0.1.36-beta.46
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 +10 -11
- package/package.json +1 -1
package/commands/nuke.mjs
CHANGED
|
@@ -312,24 +312,23 @@ export async function nukeCommand(args) {
|
|
|
312
312
|
rmSync(awDocs, { recursive: true, force: true });
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
// Remove ~/.aw_registry/ —
|
|
315
|
+
// Remove ~/.aw_registry/ — rm -rf is a no-op on non-existent paths; always safe
|
|
316
|
+
try { execSync(`rm -rf "${GLOBAL_AW_DIR}"`, { stdio: 'pipe' }); } catch { /* best effort */ }
|
|
317
|
+
|
|
318
|
+
// Remove ~/.aw/ — use rm -rf as primary since Node rmSync can silently fail on git repos
|
|
316
319
|
try {
|
|
317
|
-
|
|
320
|
+
execSync(`rm -rf "${AW_HOME}"`, { stdio: 'pipe' });
|
|
318
321
|
} catch {
|
|
319
|
-
try {
|
|
322
|
+
try { rmSync(AW_HOME, { recursive: true, force: true }); } catch { /* best effort */ }
|
|
320
323
|
}
|
|
321
324
|
|
|
322
|
-
//
|
|
325
|
+
// Verify removal actually succeeded
|
|
323
326
|
if (existsSync(AW_HOME)) {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
try { execSync(`rm -rf "${AW_HOME}"`, { stdio: 'pipe' }); } catch { /* best effort */ }
|
|
328
|
-
}
|
|
327
|
+
cloneSpinner.stop(chalk.yellow('Could not remove ~/.aw/ — please run: rm -rf ~/.aw'));
|
|
328
|
+
} else {
|
|
329
|
+
cloneSpinner.stop('Registry clone removed');
|
|
329
330
|
}
|
|
330
331
|
|
|
331
|
-
cloneSpinner.stop('Registry clone removed');
|
|
332
|
-
|
|
333
332
|
fmt.outro([
|
|
334
333
|
'Fully removed',
|
|
335
334
|
'',
|