Skip to content

Commit 34ddedb

Browse files
committed
fix(oxlint): normalize path separators in snap tests
1 parent 4e18de1 commit 34ddedb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ jobs:
169169
170170
test-napi:
171171
name: Test NAPI
172-
runs-on: ubuntu-latest
172+
runs-on: windows-latest
173173
steps:
174174
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
175175
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2

apps/oxlint/test/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ function normalizeStdout(stdout: string): string {
9292
match = line.match(/^(\s*\|\s+File path: )(.+)$/);
9393
if (match) {
9494
const [, preamble, path] = match;
95-
if (path.startsWith(REPO_ROOT_PATH)) return [`${preamble}<root>/${path.slice(REPO_ROOT_PATH.length)}`];
95+
if (path.startsWith(REPO_ROOT_PATH)) return [`${preamble}<root>/${path.slice(REPO_ROOT_PATH.length).replace(/\\/g, '/')}`];
9696
}
9797
}
98-
if (line.startsWith(REPO_ROOT_PATH)) line = `<root>/${line.slice(REPO_ROOT_PATH.length)}`;
98+
if (line.startsWith(REPO_ROOT_PATH)) line = `<root>/${line.slice(REPO_ROOT_PATH.length).replace(/\\/g, '/')}`;
9999
return [line];
100100
});
101101

0 commit comments

Comments
 (0)