Skip to content

Commit 911373d

Browse files
committed
test(grok): resolve the writer-boundary paths cross-platform for Windows CI
1 parent f387719 commit 911373d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎tests/grok-writer-boundary.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { expect, test } from "bun:test";
22
import { readdirSync, readFileSync, statSync } from "node:fs";
33
import { join } from "node:path";
4+
import { fileURLToPath } from "node:url";
45

56
/**
67
* The single-writer boundary (WP3, audit blocker 1): injectGrokConfig is the ONLY
@@ -18,7 +19,9 @@ function* walk(dir: string): Generator<string> {
1819
}
1920
}
2021

21-
const SRC = new URL("../src", import.meta.url).pathname;
22+
// fileURLToPath, not .pathname: on Windows .pathname keeps a leading slash before the
23+
// drive letter (\D:\a\...), which breaks fs calls on CI.
24+
const SRC = fileURLToPath(new URL("../src", import.meta.url));
2225

2326
test("only src/grok/inject.ts writes a grok config.toml", () => {
2427
const writers: string[] = [];

0 commit comments

Comments
 (0)