MCPcopy Create free account
hub / github.com/cortexkit/magic-context / openBrowser

Function openBrowser

packages/cli/src/commands/doctor-opencode.ts:165–180  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

163}
164
165function openBrowser(url: string): void {
166 try {
167 if (process.platform === "darwin") {
168 const child = spawnSync("open", [url], { stdio: "ignore" });
169 if (child.status === 0) return;
170 } else if (process.platform === "linux") {
171 const child = spawnSync("xdg-open", [url], { stdio: "ignore" });
172 if (child.status === 0) return;
173 } else if (process.platform === "win32") {
174 const child = spawnSync("cmd", ["/c", "start", "", url], { stdio: "ignore" });
175 if (child.status === 0) return;
176 }
177 } catch {
178 // Best-effort only.
179 }
180}
181
182async function runIssueFlow(): Promise<number> {
183 intro("Magic Context Issue Report");

Callers 1

runIssueFlowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected