MCPcopy Index your code
hub / github.com/anomalyco/opencode / waitForFile

Function waitForFile

packages/core/test/process/process.test.ts:17–27  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

15const cmd = (...args: string[]) => ChildProcess.make(NODE, args)
16
17const waitForFile = (file: string) =>
18 Effect.promise(async () => {
19 while (true) {
20 try {
21 return await fs.readFile(file, "utf8")
22 } catch (error) {
23 if ((error as NodeJS.ErrnoException).code !== "ENOENT") throw error
24 await new Promise<void>((resolve) => setTimeout(resolve, 10))
25 }
26 }
27 })
28
29describe("AppProcess", () => {
30 describe("run", () => {

Callers 1

process.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected