Skip to content

armgit / Pake

Public Imported from GitHub
0

Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.

test(ci): read the workflow with LF line endings on Windows

Tw93b4fbdb474658
diff --git a/tests/unit/ci-paths.test.ts b/tests/unit/ci-paths.test.ts
index f693632d..8527b930 100644
--- a/tests/unit/ci-paths.test.ts
+++ b/tests/unit/ci-paths.test.ts
@@ -84,7 +84,8 @@ function makeFilter(patterns: string[]) {
};
}
-const text = fs.readFileSync(WORKFLOW, 'utf8');
+// Windows checkouts convert line endings to CRLF; the patterns below expect LF.
+const text = fs.readFileSync(WORKFLOW, 'utf8').replace(/\r\n/g, '\n');
const push = eventPaths(text, 'push');
const included = makeFilter(push);
const files = execSync('git ls-files', { cwd: ROOT, encoding: 'utf8' })