MCPcopy Create free account
hub / github.com/arctic-cli/interface / openFile

Function openFile

packages/arctic/src/ide/index.ts:61–70  ·  view source on GitHub ↗
(filePath: string, line?: number)

Source from the content-addressed store, hash-verified

59 }
60
61 export function openFile(filePath: string, line?: number) {
62 const command = findAvailableCmd()
63 if (!command) return false
64 const args = line ? [`--goto`, `${filePath}:${line}`] : [filePath]
65 spawn([command, ...args], {
66 stdout: "ignore",
67 stderr: "ignore",
68 })
69 return true
70 }
71
72 export function alreadyInstalled() {
73 return process.env["ARCTIC_CALLER"] === "vscode" || process.env["ARCTIC_CALLER"] === "vscode-insiders"

Callers

nothing calls this directly

Calls 2

findAvailableCmdFunction · 0.85
spawnFunction · 0.85

Tested by

no test coverage detected