diff options
| author | Aiden Cline <[email protected]> | 2025-09-22 22:16:03 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-09-22 22:16:03 -0500 |
| commit | c23510346b6beb15cf36389fdafceb9f0d03aa3b (patch) | |
| tree | 3f4ece1e87d31e3f977b1b0e5f2c97a0bff00228 | |
| parent | f9c5df05a19c8acc8ec1b6f6598071aa35e1442a (diff) | |
| download | opencode-c23510346b6beb15cf36389fdafceb9f0d03aa3b.tar.gz opencode-c23510346b6beb15cf36389fdafceb9f0d03aa3b.zip | |
ignore: lsp debug file check (#2743)
| -rw-r--r-- | packages/opencode/src/cli/cmd/debug/lsp.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/opencode/src/cli/cmd/debug/lsp.ts b/packages/opencode/src/cli/cmd/debug/lsp.ts index 292c8ba6d..d906e5f81 100644 --- a/packages/opencode/src/cli/cmd/debug/lsp.ts +++ b/packages/opencode/src/cli/cmd/debug/lsp.ts @@ -2,6 +2,7 @@ import { LSP } from "../../../lsp" import { bootstrap } from "../../bootstrap" import { cmd } from "../cmd" import { Log } from "../../../util/log" +import { UI } from "../../ui" export const LSPCommand = cmd({ command: "lsp", @@ -15,6 +16,10 @@ const DiagnosticsCommand = cmd({ builder: (yargs) => yargs.positional("file", { type: "string", demandOption: true }), async handler(args) { await bootstrap(process.cwd(), async () => { + if (!(await Bun.file(args.file).exists())) { + UI.error(`File ${args.file} does not exist`) + return + } await LSP.touchFile(args.file, true) console.log(JSON.stringify(await LSP.diagnostics(), null, 2)) }) |
