From 5b44e5bf41ed3503b8d1633762e7fd42aa4a0f03 Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Sat, 4 Jul 2026 10:54:34 -0400 Subject: [PATCH] test(core): release shell test locations (#35271) --- packages/core/test/tool-shell.test.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/core/test/tool-shell.test.ts b/packages/core/test/tool-shell.test.ts index 6fd43ee2a2e..217414aa2ce 100644 --- a/packages/core/test/tool-shell.test.ts +++ b/packages/core/test/tool-shell.test.ts @@ -171,9 +171,11 @@ const withSession = (directory: string, body: (registry: ToolRegistry.I }) const locations = yield* LocationServiceMap.Service const locationLayer = locations.get(location) - const registry = yield* ToolRegistry.Service.pipe(Effect.provide(locationLayer)) - yield* waitForTool(registry, ShellTool.name) - return yield* body(registry).pipe(Effect.provide(locationLayer)) + return yield* Effect.gen(function* () { + const registry = yield* ToolRegistry.Service + yield* waitForTool(registry, ShellTool.name) + return yield* body(registry) + }).pipe(Effect.provide(locationLayer), Effect.ensuring(locations.invalidate(location))) }) describe("ShellTool", () => {