Skip to content

Comments

fix: Windows CRLF compatibility for core functions#31

Merged
maxim-uvarov merged 2 commits intomainfrom
fix/windows-crlf
Dec 30, 2025
Merged

fix: Windows CRLF compatibility for core functions#31
maxim-uvarov merged 2 commits intomainfrom
fix/windows-crlf

Conversation

@maxim-uvarov
Copy link
Member

Summary

Windows compatibility fixes following numd's pattern:

CRLF→LF normalization at input:

  • set-x
  • embeds-update
  • embeds-remove
  • variable-definitions-to-record

Explicit LF output (str join "\n" instead of to text):

  • set-x
  • extract-command-code
  • embeds-remove
  • execute-and-parse-results

Bug fix:

  • capture-marker: Changed from def to export def (was not exported, causing silent import failures on Windows)

Error handling:

  • variable-definitions-to-record: Handle empty parse results and subprocess errors gracefully

Test plan

  • All tests pass locally on macOS
  • Test on Windows VM to verify embeds-update works

🤖 Generated with Claude Code

Apply CRLF→LF normalization at input and explicit LF output for:
- set-x: normalize input, use str join "\n"
- extract-command-code: use str join "\n"
- embeds-update: normalize input
- embeds-remove: normalize input, use str join "\n"
- execute-and-parse-results: replace to text in generated code
- variable-definitions-to-record: normalize input, handle errors gracefully
- capture-marker: export the function (was def, now export def)

Following numd's Windows compatibility pattern.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Cleaner approach: change the closure source to use `str join "\n"`
directly rather than patching `to text` via string replacement.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@maxim-uvarov maxim-uvarov merged commit a5f5063 into main Dec 30, 2025
2 checks passed
@maxim-uvarov maxim-uvarov deleted the fix/windows-crlf branch December 30, 2025 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants