@bobbyg603/mog 0.1.1 → 0.1.2
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/package.json +1 -1
- package/src/index.ts +7 -10
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
|
|
3
|
+
import { spawnSync } from "child_process";
|
|
3
4
|
import { fetchIssue } from "./github";
|
|
4
5
|
import { ensureRepo, createWorktree } from "./worktree";
|
|
5
6
|
import { ensureSandbox, runClaude } from "./sandbox";
|
|
@@ -20,12 +21,10 @@ async function init() {
|
|
|
20
21
|
} else {
|
|
21
22
|
log.info(`Creating persistent sandbox '${SANDBOX_NAME}'...`);
|
|
22
23
|
log.info(`Workspace: ${reposDir}`);
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
stdout: "inherit",
|
|
26
|
-
stderr: "inherit",
|
|
24
|
+
const createResult = spawnSync("docker", ["sandbox", "create", "--name", SANDBOX_NAME, "claude", reposDir], {
|
|
25
|
+
stdio: "inherit",
|
|
27
26
|
});
|
|
28
|
-
const createExit =
|
|
27
|
+
const createExit = createResult.status;
|
|
29
28
|
if (createExit !== 0) {
|
|
30
29
|
log.die("Failed to create sandbox.");
|
|
31
30
|
}
|
|
@@ -36,12 +35,10 @@ async function init() {
|
|
|
36
35
|
console.log();
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
stdout: "inherit",
|
|
42
|
-
stderr: "inherit",
|
|
38
|
+
const runResult = spawnSync("docker", ["sandbox", "run", SANDBOX_NAME], {
|
|
39
|
+
stdio: "inherit",
|
|
43
40
|
});
|
|
44
|
-
const exitCode =
|
|
41
|
+
const exitCode = runResult.status;
|
|
45
42
|
if (exitCode !== 0) {
|
|
46
43
|
log.die("Sandbox failed to run. Try 'docker sandbox ls' to check its status.");
|
|
47
44
|
}
|