Skip to content

abso-core

Public

abso is version control for agents: the client, the engine and a server you can run on your own Cloudflare account.

Check passed
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

--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.

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 @@
5555 throw new UsageError(`--${flag} ${path}: no such file to read`);
5656 }
5757 }
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
59+ // (the Issues Worker refuses a carriage return as a character a reader can't see).
60+ text = text.replace(/\r\n?/g, "\n").replace(/\n$/, "");
5961 if (text.trim() === "") throw new UsageError(`--${flag} ${path}: the text is empty`);
6062 return text;
6163 };
--- a/client/test/body-files.test.ts
+++ b/client/test/body-files.test.ts
@@ -11,8 +11,9 @@
1111
1212const dir = mkdtempSync(join(tmpdir(), "abso-body-"));
1313after(() => rmSync(dir, { recursive: true, force: true }));
14−const BODY = "First line:\n\n- one\n- two\r\n\nLast line.";
15−writeFileSync(join(dir, "body.md"), `${BODY}\n`);
14+const BODY = "First line:\n\n- one\n- two\n\nLast line.";
15+// Written with one Windows line ending inside, which arrives as LF.
16+writeFileSync(join(dir, "body.md"), `${BODY.replace("- two\n", "- two\r\n")}\r\n`);
1617writeFileSync(join(dir, "empty.md"), "\n \n");
1718
1819const ISSUE = { comment: "string", description: "string", title: "string", drop: "boolean" } as const;