@getmonoceros/workbench 1.36.6 → 1.36.7
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 +31 -4
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -8872,7 +8872,7 @@ var CLI_VERSION;
|
|
|
8872
8872
|
var init_version = __esm({
|
|
8873
8873
|
"src/version.ts"() {
|
|
8874
8874
|
"use strict";
|
|
8875
|
-
CLI_VERSION = true ? "1.36.
|
|
8875
|
+
CLI_VERSION = true ? "1.36.7" : "dev";
|
|
8876
8876
|
}
|
|
8877
8877
|
});
|
|
8878
8878
|
|
|
@@ -11362,9 +11362,36 @@ async function runRemove(opts) {
|
|
|
11362
11362
|
await fs18.copyFile(envPath, path29.join(backupPath, `${opts.name}.env`));
|
|
11363
11363
|
}
|
|
11364
11364
|
if (hasContainer) {
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
|
|
11365
|
+
const dst = path29.join(backupPath, "container");
|
|
11366
|
+
try {
|
|
11367
|
+
await fs18.cp(containerPath, dst, { recursive: true });
|
|
11368
|
+
} catch (err) {
|
|
11369
|
+
const code = err.code;
|
|
11370
|
+
if (code !== "EACCES" && code !== "EPERM") {
|
|
11371
|
+
throw err;
|
|
11372
|
+
}
|
|
11373
|
+
logger.info(
|
|
11374
|
+
`[remove] backup hit ${code} on root-owned files; copying via a throw-away alpine container\u2026`
|
|
11375
|
+
);
|
|
11376
|
+
await fs18.mkdir(dst, { recursive: true });
|
|
11377
|
+
const { exitCode, stderr } = await dockerExec([
|
|
11378
|
+
"run",
|
|
11379
|
+
"--rm",
|
|
11380
|
+
"-v",
|
|
11381
|
+
`${containerPath}:/src:ro`,
|
|
11382
|
+
"-v",
|
|
11383
|
+
`${dst}:/dst`,
|
|
11384
|
+
"alpine:3.21",
|
|
11385
|
+
"sh",
|
|
11386
|
+
"-c",
|
|
11387
|
+
"cp -a /src/. /dst/"
|
|
11388
|
+
]);
|
|
11389
|
+
if (exitCode !== 0) {
|
|
11390
|
+
throw new Error(
|
|
11391
|
+
`docker-based backup of ${containerPath} failed (exit ${exitCode}${stderr.trim() ? `: ${stderr.trim()}` : ""}).`
|
|
11392
|
+
);
|
|
11393
|
+
}
|
|
11394
|
+
}
|
|
11368
11395
|
}
|
|
11369
11396
|
logger.info(`Backup written to ${prettyPath(backupPath)}.`);
|
|
11370
11397
|
}
|