--comment-file, --description-file and the other -file flags sent a file's text as it was on disk. A file saved on Windows has CRLF line endings, and the Issues server refuses a carriage return as a character a reader can't see, so a comment written in a Windows editor was refused. The text now goes up with LF only, as typed text does. A test reads a file with Windows line endings.
- MCP
- show on this site's /mcp
- CLI
- abso show 19 --json
- JSON
- /christopher/abso-core/versions/19?format=json
A body read from a file goes up with LF line endings
of shared·pinch··Not checked
Version 18 · Files at version 19
2 files, 6 lines added, 3 removed.
--- a/client/src/body-files.ts
+++ b/client/src/body-files.ts
@@ -55,7 +55,9 @@
58− text = text.replace(/\r?\n$/, "");
58+ // A file saved on Windows has CRLF line endings; the text goes up with LF only, as typed text does
--- a/client/test/body-files.test.ts
+++ b/client/test/body-files.test.ts
@@ -11,8 +11,9 @@
1111
14−const BODY = "First line:\n\n- one\n- two\r\n\nLast line.";
15−writeFileSync(join(dir, "body.md"), `${BODY}\n`);
1718
1819const ISSUE = { comment: "string", description: "string", title: "string", drop: "boolean" } as const;