-
Notifications
You must be signed in to change notification settings - Fork 85
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
Support ignore and keep empty system environments #25
Comments
Wondering how to do something like |
seems that go version not support that but linux version supported. |
Came here to raise the same request, this tool is really good apart from having to escape env vars. That's tripped me up a few times recently. |
Any chance of adding an option to leave any vars that are NOT found? |
I hope this PR address this issue. |
While GNU envsubst does have the ability to specify the variables to substitute, we always use ps. I got here from https://mikefarah.gitbook.io/yq/operators/env-variable-operators and this is a great extension to yq. |
actually I started doing something similar, without reading these issues first 🤦 but yes being strict about only replacing vars found in the provided env would be very useful for a number of scenarios. the answer might be somewhere in between the 2 PRs, my and this one. would be good to get somewhere with this. @hobti01 my PR currently goes for something similar to your approach, however @renato-farias approach may be useful too. The biggest problem I would see is the lexer throwing away the |
IMO if the variable is not replaced it should remain unmodified, leaving any unclosing braces. |
Any update on this? |
e.g
I have prometheus config below which want only replace CONSUL_URL from system environment. but it will replace $1 left blank there which make metrics_path not correct.
The text was updated successfully, but these errors were encountered: