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
Quotation Marks in Environment Variables #650
Labels
bug_with_workaround
Something isn't working but there is a workaround
Milestone
Comments
4 tasks
That's a good catch 👍🏻 Please review: #651 |
MaxymVlasov
added this to the Features implementing and cleanup without breaking changes milestone
Mar 25, 2024
MaxymVlasov
added
bug_with_workaround
Something isn't working but there is a workaround
and removed
bug
Something isn't working
area/local_installation
labels
Mar 25, 2024
WorkaroundRemove quotes: - --env-vars=KEY=value
- --env-vars=KEY2=value with spaces
- -e KEY4=value with spaces That's all that will work, but there a chance of adding nonindependent spaces like - --env-vars=KEY3= value with spaces Which will be rendered to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Environment variables are not being exported as you'd imagine. The quotation marks from the example in the README are being exported. Perhaps some 3rd party tool like
terraform
is ignoring/stripping them? They do not belong.If this behavior is desired, I'd recommend simply changing the example to not include quotes.
I noticed this when trying to implement the same feature in Python for #648, but now I need clarity on this ;-)
How can we reproduce it?
This is evident if you do the use the example from the README...
... and then modify your
terraform_fmt.sh
to call the following immediately aftercommon::parse_and_export_env_vars
to see what's actually being set in the environment:You'll see in
/tmp/env_vars
that the quotes came along. This is incorrect.Environment information
uname -a
and/orsysteminfo | Select-String "^OS"
output:Linux MYPCNAME 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
.pre-commit-config.yaml
:file content
The text was updated successfully, but these errors were encountered: