File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import { LSPServer } from "../lsp/server"
1818import { BunProc } from "@/bun"
1919import { Installation } from "@/installation"
2020import { ConfigMarkdown } from "./markdown"
21+ import { existsSync } from "fs"
2122
2223export namespace Config {
2324 const log = Log . create ( { service : "config" } )
@@ -103,7 +104,10 @@ export namespace Config {
103104 }
104105 }
105106
106- installDependencies ( dir )
107+ const exists = existsSync ( path . join ( dir , "node_modules" ) )
108+ const installing = installDependencies ( dir )
109+ if ( ! exists ) await installing
110+
107111 result . command = mergeDeep ( result . command ?? { } , await loadCommand ( dir ) )
108112 result . agent = mergeDeep ( result . agent , await loadAgent ( dir ) )
109113 result . agent = mergeDeep ( result . agent , await loadMode ( dir ) )
Original file line number Diff line number Diff line change @@ -212,11 +212,6 @@ export namespace Worktree {
212212 throw new StartCommandFailedError ( { message : errorText ( ran ) || "Worktree start command failed" } )
213213 }
214214
215- const opencodeDir = path . join ( info . directory , ".opencode" )
216- if ( await Bun . file ( opencodeDir ) . exists ( ) ) {
217- await Config . installDependencies ( info . directory )
218- }
219-
220215 return info
221216 } )
222217}
You can’t perform that action at this time.
0 commit comments