Skip to content

Fixed backwards compatibility with godotenv 1.4.0 allowing hyphens in variable names.#245

Merged
joho merged 1 commit into
joho:mainfrom
qwerty-iot:allow_hyphen
May 19, 2026
Merged

Fixed backwards compatibility with godotenv 1.4.0 allowing hyphens in variable names.#245
joho merged 1 commit into
joho:mainfrom
qwerty-iot:allow_hyphen

Conversation

@bocajim
Copy link
Copy Markdown
Contributor

@bocajim bocajim commented Mar 31, 2025

Version 1.4.0 allowed hyphen "-" to be in environment variable names, after 1.4.0 this resulted in a parsing error which breaks backwards compatibility. Added back in hyphen support in variable names with associated test cases. While hyphen may not be supported everywhere, it is supported in most OS distributions.

… after 1.4.0 this resulted in a parsing error which breaks backwards compatibility. Added back in hyphen support in variable names with associated test cases.
joho added a commit that referenced this pull request May 19, 2026
Adds a negative-test case asserting that '+', '@', and '/' still
return errors after #245 widens the variable-name charset to include
'-'. If a future change widens the charset further, the relevant
case here must be removed on purpose.
@joho joho merged commit 82194f2 into joho:main May 19, 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