-
Notifications
You must be signed in to change notification settings - Fork 63
fix: fix config not searched at root of filesystem #312
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
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
The CLA should be available now. |
|
Please add a description to the PR that explains what this is fixing. |
|
Done |
|
Sorry, it looks like the CLA is still not working for some reason. There's troubleshooting steps in the invocation to help determine why it's still not working: https://github.com/google/yamlfmt/pull/312/checks?check_run_id=60405691271 |
|
I've double checked the CLA, but I can not see why it should not work. The GitHub username has been made lowercase within the CLA, but besides that it matches and the E-Mail used to commit is also contained within the CLA. If this does for what ever reason not work, I am completely fine if someone copies the five lines and opens a new PR with a valid CLA. There is absolutely nothing special about that lines and I do not need attribution for it. |
|
Can anyone with a working CLA create a new PR? |
|
Never mind, I've overlooked the sentence stating to rescan for CLAs which provides a link. |
|
Oh great it's working now. Sorry that the comment from two weeks ago slipped past me, I could have made the patch sooner. (managing everything through GitHub notifications instead of email is having some growing pains) Thank you for the patch! |
This pull request fixes a problem with the current way to find the config. Currently the config will be searched up to the root but excluding it, even if the working directory is the root. This means a file at
/yamlfmt.yamlwill never be considered as config file. This is especially noticeable in container images where the working directory is either not known during the build of the image (in which the config will be added) or the config should only be a fallback in case the mounted working directory itself does not contain one. Using the$XDG_CONFIG_HOMEwouldn't be a suitable solution, as the container may not be run as the user it has been configured with during the build of the image.