Skip to content

fix: accept UTF-8 BOM in dotenv files - #214

Open
LouisDeconinck wants to merge 1 commit into
getsotto:mainfrom
LouisDeconinck:fix/dotenv-bom-203
Open

fix: accept UTF-8 BOM in dotenv files#214
LouisDeconinck wants to merge 1 commit into
getsotto:mainfrom
LouisDeconinck:fix/dotenv-bom-203

Conversation

@LouisDeconinck

Copy link
Copy Markdown
Contributor

Summary

Ignore one optional leading UTF-8 BOM when parsing .env input, while preserving BOM characters inside values and adding LF/CRLF regression coverage.

Checks

  • git diff --check
  • cargo test -p sotto-cli dotenv and cargo fmt --all --check could not run locally because Cargo is not installed

Closes #203

@github-actions

Copy link
Copy Markdown

Thanks for your first pull request to Sotto, and welcome.

Two things that trip up newcomers:

  • Every commit needs a Signed-off-by line under the Developer Certificate of Origin - PRs with unsigned commits cannot be merged. Sign off with git commit -s; if your branch already has unsigned commits, run git rebase --signoff main and push again.
  • Please run cargo fmt --all --check and cargo clippy --workspace --all-targets -- -D warnings before pushing, and add tests for new behaviour (cargo test --workspace runs the suite).

The full guide is in CONTRIBUTING.md - a maintainer will review shortly.

@Maxerns Maxerns left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you've been on a roll: I opened #216 for the greeter posting "first PR" greetings on every PR from returning contributors (you've received a few yourself). It's a small Actions/J
avaScript task with a defined policy feel free to pick it up if it interests you.

Signed-off-by: Louis Deconinck <louis.dck@gmail.com>
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.

CLI: accept a leading UTF-8 BOM when importing .env files

2 participants