@kud/soap-cli 3.0.14 → 3.0.15

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.
Files changed (2) hide show
  1. package/dist/index.js +19 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -247,7 +247,7 @@ var param = rawArgs.find((a) => !a.startsWith("-"));
247
247
  var yes = rawArgs.includes("--yes") || rawArgs.includes("-y");
248
248
  var yesDangerously = rawArgs.includes("--yes-dangerously");
249
249
  if (firstArg === "--version" || firstArg === "-v") {
250
- console.log("3.0.14");
250
+ console.log("3.0.15");
251
251
  process.exit(0);
252
252
  }
253
253
  if (!firstArg || firstArg === "--help" || firstArg === "-h") {
@@ -318,11 +318,16 @@ try {
318
318
  signale.error(`Could not determine app name for "${param}".`);
319
319
  process.exit(1);
320
320
  }
321
- const bundleId = await getBundleIdentifier(appName);
322
- const scannedFiles = await spinner(
321
+ let bundleId = "";
322
+ try {
323
+ bundleId = await getBundleIdentifier(appName);
324
+ } catch {
325
+ signale.warn(`App "${appName}" is not installed \u2014 skipping file scan.`);
326
+ }
327
+ const scannedFiles = bundleId ? await spinner(
323
328
  chalk.dim("Scanning for files\u2026"),
324
329
  () => findAppFiles(appName, bundleId)
325
- );
330
+ ) : [];
326
331
  const appFiles = [
327
332
  .../* @__PURE__ */ new Set([
328
333
  ...isCask ? scannedFiles.slice(1) : scannedFiles,
@@ -459,6 +464,16 @@ Force-run ${chalk.bold(`brew uninstall --zap --force ${param}`)}?`,
459
464
  signale.pending("Force-uninstalling cask\u2026");
460
465
  await $2`brew uninstall --zap --force ${param}`;
461
466
  signale.success("Force uninstall complete.");
467
+ const brewPrefix = (await $2`brew --prefix`).stdout.trim();
468
+ const caskroomEntry = `${brewPrefix}/Caskroom/${param}`;
469
+ try {
470
+ await fs2.access(caskroomEntry);
471
+ await trash(caskroomEntry);
472
+ signale.success(
473
+ `Removed leftover Caskroom entry: ${chalk.dim(caskroomEntry)}`
474
+ );
475
+ } catch {
476
+ }
462
477
  }
463
478
  } else if (isCask && isPermissionError) {
464
479
  signale.info(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/soap-cli",
3
- "version": "3.0.14",
3
+ "version": "3.0.15",
4
4
  "description": "An app cleaner cli for macOS",
5
5
  "main": "dist/index.js",
6
6
  "bin": {