@markus-global/cli 0.8.4-rc.10 → 0.8.4-rc.12
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/markus.mjs
CHANGED
|
@@ -203393,13 +203393,15 @@ You can now:
|
|
|
203393
203393
|
this.json(res, 400, { error: "Invalid or non-existent path" });
|
|
203394
203394
|
return;
|
|
203395
203395
|
}
|
|
203396
|
-
const
|
|
203397
|
-
|
|
203398
|
-
|
|
203399
|
-
|
|
203400
|
-
|
|
203401
|
-
|
|
203402
|
-
|
|
203396
|
+
const { spawn: spawnChild } = await import("node:child_process");
|
|
203397
|
+
const plat = process.platform;
|
|
203398
|
+
if (plat === "darwin") {
|
|
203399
|
+
spawnChild("open", [dirPath], { detached: true, stdio: "ignore" }).unref();
|
|
203400
|
+
} else if (plat === "win32") {
|
|
203401
|
+
spawnChild("explorer", [dirPath], { detached: true, stdio: "ignore", shell: true }).unref();
|
|
203402
|
+
} else {
|
|
203403
|
+
spawnChild("xdg-open", [dirPath], { detached: true, stdio: "ignore" }).unref();
|
|
203404
|
+
}
|
|
203403
203405
|
this.json(res, 200, { ok: true });
|
|
203404
203406
|
} catch {
|
|
203405
203407
|
this.json(res, 500, { error: "Failed to open path" });
|