Skip to content

Commit c9d025c

Browse files
fix: use read_bytes/write_bytes for platform-stable EOL handling
Address Copilot review: avoid platform newline translation by using read_bytes()/write_bytes() instead of read_text()/write_text() when post-processing SKILL.md files for argument-hint injection.
1 parent 9ab30ca commit c9d025c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/specify_cli/integrations/claude/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,10 @@ def setup(
142142
if not hint:
143143
continue
144144

145-
content = path.read_text(encoding="utf-8")
145+
content_bytes = path.read_bytes()
146+
content = content_bytes.decode("utf-8")
146147
updated = self.inject_argument_hint(content, hint)
147148
if updated != content:
148-
path.write_text(updated, encoding="utf-8")
149+
path.write_bytes(updated.encode("utf-8"))
149150

150151
return created

0 commit comments

Comments
 (0)