Skip to content
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

Lines from conf files that are comments should not be passed to shell.Expand #374

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

m90
Copy link
Member

@m90 m90 commented Feb 23, 2024

Closes #373

Currently, all lines in a file from conf.d will be passed to shell.Expand no matter if they are comments or not. This is not a problem per se, but as shell.Expand will refuse to do command substitution (as to prevent execution of arbitrary code), comments containing either $(cmd) or cmd style commands will raise an error.

As there does not seem to be a way to adjust the behavior of shell.Expand further, this PR fixes the issue by skipping lines that are obviously comments.

@m90 m90 merged commit 9b768c7 into main Feb 23, 2024
3 checks passed
@m90 m90 deleted the env-comments branch February 23, 2024 16:53
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.

loadConfigsFromEnvFiles does not ignore comments in file configs
1 participant