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: normalize crlf before splitting workflow scripts

youxi798e682b359973a
diff --git a/tests/integration/workflow-paths.test.js b/tests/integration/workflow-paths.test.js
index f62fb0f8..d3ce2704 100644
--- a/tests/integration/workflow-paths.test.js
+++ b/tests/integration/workflow-paths.test.js
@@ -149,7 +149,8 @@ describe("Workflow path integration", () => {
])(
"passes inputs to %s scripts through env, not shell interpolation",
(file) => {
- const workflow = fs.readFileSync(file, "utf8");
+ // Windows checkouts use CRLF; normalize so the split sees each step.
+ const workflow = fs.readFileSync(file, "utf8").replace(/\r\n/g, "\n");
const scripts = workflow
.split(/\n\s+run: \|\n/)
.slice(1)