-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
taplo-cli: add ENV variable support #427
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, that's a good idea!
Co-authored-by: Julien Cretin <[email protected]>
Thanks, @ia0! Changes made. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
You also need to add the env
feature to clap
.
-clap = { version = "3.0.0", features = ["derive", "cargo"] }
+clap = { version = "3.0.0", features = ["derive", "cargo", "env"] }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This pull request improves the configuration file lookup logic in taplo-cli. The changes enable the CLI to search for a configuration file in the
TAPLO_CONFIG
environment variable if no configuration file is found in the current working directory and no explicit path has been provided by the user.Changes:
load_config
function.