@ghl-ai/aw 0.1.36-beta.54 → 0.1.36-beta.55
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 +7 -1
- package/package.json +1 -1
package/commands/nuke.mjs
CHANGED
|
@@ -54,7 +54,9 @@ function removeIdeSymlinks() {
|
|
|
54
54
|
const dir = join(base, ide, type);
|
|
55
55
|
if (!existsSync(dir)) continue;
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
let entries;
|
|
58
|
+
try { entries = readdirSync(dir); } catch { continue; }
|
|
59
|
+
for (const entry of entries) {
|
|
58
60
|
const p = join(dir, entry);
|
|
59
61
|
try {
|
|
60
62
|
const stat = lstatSync(p);
|
|
@@ -200,6 +202,10 @@ function removeIdeTasks() {
|
|
|
200
202
|
}
|
|
201
203
|
|
|
202
204
|
export async function nukeCommand(args) {
|
|
205
|
+
// Catch unhandled errors and surface them instead of letting clack show generic "Something went wrong"
|
|
206
|
+
process.on('uncaughtException', (e) => { fmt.cancel(`Unexpected error: ${e.message}`); });
|
|
207
|
+
process.on('unhandledRejection', (e) => { fmt.cancel(`Unexpected error: ${e?.message ?? e}`); });
|
|
208
|
+
|
|
203
209
|
fmt.intro('aw nuke');
|
|
204
210
|
|
|
205
211
|
// Remove stale local .aw_registry symlink if present (skip if cwd IS home — that's the global one)
|