(body: (dir: string) => Effect.Effect<A, E, R>)
| 8 | import { resolveToolInvocation, sanitizeCliOutputText, shellQuoteArg } from "./tooling"; |
| 9 | |
| 10 | const withTmp = <A, E, R>(body: (dir: string) => Effect.Effect<A, E, R>): Effect.Effect<A, E, R> => |
| 11 | Effect.acquireUseRelease( |
| 12 | Effect.sync(() => mkdtempSync(join(tmpdir(), "exec-call-"))), |
| 13 | body, |
| 14 | (dir) => Effect.sync(() => rmSync(dir, { recursive: true, force: true })), |
| 15 | ); |
| 16 | |
| 17 | describe("resolveToolInvocation", () => { |
| 18 | it.effect("reads the JSON arg from a file via @path", () => |