-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect escape of exclamation mark in export #485
Comments
For the dotenv format: The escaping of the exclamation point derives from https://github.com/joho/godotenv, which explicitly includes it among characters needing escaping. There is a godotenv issue about this, but the (former) repo maintainer claims that the escaping is correct to maintain compatibility with the Ruby and node dotenv libraries. So, escaping is probably the right thing to do. We could add an option to avoid escaping exclamation points, but then the resulting file wouldn't be in correct dotenv format. (It would make it directly consumable by the shell, though ... probably.) Another choice is to make a new output format like |
It seems like that maintainer is asking rather than claiming that is the behavior ruby/node. Someone will need to check it. |
Tested with ruby and it works as expected:
Returns |
Same thing with node:
Outputs: No need for incorrect escape of |
And it is generally assumed A lot of scripts rely on that: |
Thank you for all that legwork! 🙏 I'm convinced. If you'd like to submit a PR yourself to fix chamber, please do. I recently made sure that our contributing guidelines were still valid. |
I have an exclamation mark in the middle of value:
"a!b"
Export with
chamber env foo
works fine butchamber export --format dotenv foo
incorrectly escapes the excalamation to"a\!b"
. The same thing happens with tfvars format.The text was updated successfully, but these errors were encountered: