diff --git a/backend/test/helpers/opencode-binary.ts b/backend/test/helpers/opencode-binary.ts index f52cf720..ad62d80b 100644 --- a/backend/test/helpers/opencode-binary.ts +++ b/backend/test/helpers/opencode-binary.ts @@ -223,8 +223,11 @@ export async function startOpenCodeServe(options: OpenCodeServeOptions = {}): Pr readOutput: () => output, terminate, stop: async () => { - await terminate() - await removeOwnedDirectories() + try { + await terminate() + } finally { + await removeOwnedDirectories() + } }, } }