@getmonoceros/workbench 1.10.0 → 1.10.1

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/dist/bin.js CHANGED
@@ -4600,7 +4600,7 @@ async function persistPromptedIdentity(prompted, ymlPath, home, logger) {
4600
4600
  }
4601
4601
 
4602
4602
  // src/version.ts
4603
- var CLI_VERSION = true ? "1.10.0" : "dev";
4603
+ var CLI_VERSION = true ? "1.10.1" : "dev";
4604
4604
 
4605
4605
  // src/commands/_dispatch.ts
4606
4606
  import { consola as consola12 } from "consola";
@@ -6100,7 +6100,30 @@ async function runRemove(opts) {
6100
6100
  await fs14.rm(ymlPath, { force: true });
6101
6101
  }
6102
6102
  if (hasContainer) {
6103
- await fs14.rm(containerPath, { recursive: true, force: true });
6103
+ try {
6104
+ await fs14.rm(containerPath, { recursive: true, force: true });
6105
+ } catch (err) {
6106
+ const code = err.code;
6107
+ if (code !== "EACCES" && code !== "EPERM") {
6108
+ throw err;
6109
+ }
6110
+ logger.info(
6111
+ `[remove] host-side rm hit ${code} on ${prettyPath(containerPath)}; using a throw-away alpine container to clean root-owned files\u2026`
6112
+ );
6113
+ const exit = await dockerSpawn(
6114
+ [
6115
+ "-c",
6116
+ `docker run --rm -v "${containerPath}":/target alpine:3.21 find /target -mindepth 1 -delete`
6117
+ ],
6118
+ home
6119
+ );
6120
+ if (exit !== 0) {
6121
+ throw new Error(
6122
+ `docker-based cleanup of ${containerPath} exited ${exit}. Inspect with \`sudo ls -la ${containerPath}\` and clean manually.`
6123
+ );
6124
+ }
6125
+ await fs14.rm(containerPath, { recursive: true, force: true });
6126
+ }
6104
6127
  }
6105
6128
  logger.success(
6106
6129
  `Removed '${opts.name}': docker objects gone, container-configs entry deleted, container directory deleted.`