Skip to content

Fix dotenv get in case of handling of empty string values - #642

Closed
kocsisbalazs wants to merge 1 commit into
theskumar:mainfrom
kocsisbalazs:fix-empty-cli-get
Closed

kocsisbalazs wants to merge 1 commit into
theskumar:mainfrom
kocsisbalazs:fix-empty-cli-get

Conversation

@kocsisbalazs

Copy link
Copy Markdown

The CLI get command treated empty string values as missing because it used a truthiness check. This caused keys defined as KEY= in .env files to incorrectly. The is not None check so existing keys with empty values are returned correctly.

@theskumar

Copy link
Copy Markdown
Owner

Thanks @kocsisbalazs, this was the right fix: switching get to an is not None check. The same change, plus regression tests and a CHANGELOG entry, landed in #700 (f215c02), which fixes #699. Closing this one as superseded. Thanks again for the contribution.

@theskumar theskumar closed this Oct 1, 2026
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