@bobbyg603/mog 0.1.0 → 0.1.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/package.json +1 -1
- package/src/index.ts +13 -2
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -20,7 +20,15 @@ async function init() {
|
|
|
20
20
|
} else {
|
|
21
21
|
log.info(`Creating persistent sandbox '${SANDBOX_NAME}'...`);
|
|
22
22
|
log.info(`Workspace: ${reposDir}`);
|
|
23
|
-
|
|
23
|
+
const createProc = Bun.spawn(["docker", "sandbox", "create", "--name", SANDBOX_NAME, "claude", reposDir], {
|
|
24
|
+
stdin: "inherit",
|
|
25
|
+
stdout: "inherit",
|
|
26
|
+
stderr: "inherit",
|
|
27
|
+
});
|
|
28
|
+
const createExit = await createProc.exited;
|
|
29
|
+
if (createExit !== 0) {
|
|
30
|
+
log.die("Failed to create sandbox.");
|
|
31
|
+
}
|
|
24
32
|
log.ok("Sandbox created.");
|
|
25
33
|
console.log();
|
|
26
34
|
log.info("Launching sandbox — authenticate with /login to use your Max subscription.");
|
|
@@ -33,7 +41,10 @@ async function init() {
|
|
|
33
41
|
stdout: "inherit",
|
|
34
42
|
stderr: "inherit",
|
|
35
43
|
});
|
|
36
|
-
await proc.exited;
|
|
44
|
+
const exitCode = await proc.exited;
|
|
45
|
+
if (exitCode !== 0) {
|
|
46
|
+
log.die("Sandbox failed to run. Try 'docker sandbox ls' to check its status.");
|
|
47
|
+
}
|
|
37
48
|
|
|
38
49
|
log.ok("mog is ready. Run: mog <owner/repo> <issue_number>");
|
|
39
50
|
}
|