@markus-global/cli 0.8.4-rc.10 → 0.8.4-rc.11

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 platform9 = process.platform;
203397
- if (platform9 === "darwin")
203398
- execSync4(`open ${JSON.stringify(dirPath)}`);
203399
- else if (platform9 === "win32")
203400
- execSync4(`explorer ${JSON.stringify(dirPath)}`);
203401
- else
203402
- execSync4(`xdg-open ${JSON.stringify(dirPath)}`);
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" });