Skip to content
TypeScript

fix(relay): read migrations in checkout paths with spaces (#30080)

domvox4a23e9e1bf12
diff --git a/infra/relay/src/environments/ManagedTunnelLimits.test.ts b/infra/relay/src/environments/ManagedTunnelLimits.test.ts
index 6b8dd817ee0..4842d019eb2 100644
--- a/infra/relay/src/environments/ManagedTunnelLimits.test.ts
+++ b/infra/relay/src/environments/ManagedTunnelLimits.test.ts
@@ -4,6 +4,7 @@ import * as Context from "effect/Context";
import * as Effect from "effect/Effect";
import * as FileSystem from "effect/FileSystem";
import * as Layer from "effect/Layer";
+import * as Path from "effect/Path";
import * as Semaphore from "effect/Semaphore";
import { PGlite } from "@electric-sql/pglite";
import { drizzle } from "drizzle-orm/pglite";
@@ -187,7 +188,10 @@ describe("ManagedTunnelLimits", () => {
Effect.promise(() => PGlite.create()),
(client) => Effect.promise(() => client.close()),
);
- const migrationsDir = new URL("../../migrations/postgres/", import.meta.url).pathname;
+ const path = yield* Path.Path;
+ const migrationsDir = yield* path.fromFileUrl(
+ new URL("../../migrations/postgres/", import.meta.url),
+ );
const migrations = (yield* fs.readDirectory(migrationsDir)).toSorted();
const applyMigrations = (names: ReadonlyArray<string>) =>
Effect.forEach(names, (name) =>