Skip to content

Fix newline handling when appending to .env - #37

Merged
MikeGarde merged 2 commits into
mainfrom
fix/36-no-trailing-newline
Jul 27, 2026
Merged

Fix newline handling when appending to .env#37
MikeGarde merged 2 commits into
mainfrom
fix/36-no-trailing-newline

Conversation

@MikeGarde

Copy link
Copy Markdown
Owner
  • Ensure appending a new entry inserts a leading newline if the existing content lacks a trailing one, so the new key starts on its own line.
  • Extend tests/set_and_delete.rs to cover the newline-edge case: when the file has no trailing newline, adding a new key appends on its own line and the final content ends with a newline; verify both keys are readable via --file.

- Ensure appending a new entry inserts a leading newline if the existing content lacks a trailing one, so the new key starts on its own line.
- Extend tests/set_and_delete.rs to cover the newline-edge case: when the file has no trailing newline, adding a new key appends on its own line and the final content ends with a newline; verify both keys are readable via --file.
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/handlers/set_value.rs 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@MikeGarde
MikeGarde merged commit ce0b678 into main Jul 27, 2026
6 checks passed
@MikeGarde
MikeGarde deleted the fix/36-no-trailing-newline branch July 27, 2026 00:19
@MikeGarde

Copy link
Copy Markdown
Owner Author

Closes #36

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.

1 participant