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