Warn user about .yml config file extension#1798
Warn user about .yml config file extension#1798onnimonni wants to merge 2 commits intogetsops:mainfrom
Conversation
Signed-off-by: Onni Hakala <onni@flaky.build>
1d1ce9d to
4619e54
Compare
|
Thanks for your contribution! Personally I'm against this change. Having different config file names is usually more a source of confusion. There's already a note in the documentation, though it's a bit hidden since there's no central configuration documentation so far: https://github.com/getsops/sops?tab=readme-ov-file#213using-sopsyaml-conf-to-select-kms-pgp-and-age-for-new-files |
I think this is a good point and similarly as we have linting rules in the code it's fine if you and the rest of the team want to keep this convention in sops. How about logging a warning instead if The warning would make it more obvious for the user that their config was found but AFAIK most other software will allow both variants and I assume I will not be the last one to stumble for this. EDIT: Clarified weird sentences 👍 |
I think it would be best to report a warning if SOPS needs a config file and doesn't find one, but does find a |
Signed-off-by: Onni Hakala <onni@flaky.build>
f958052 to
f0ea3ac
Compare
|
Sorry that it took so long and I'm definitely not golang expert but I think this should do it 👍 |
|
I created a new PR (#1820) which comes closer to what I'd prefer the warning to behave like, and which also compiles :) Thanks for your contribution though, I think this warning is really helpful! |
|
Thanks @felixfontein 🙇! I'm very happy with the new error messages 👍 |
Hey,
I spent way too much time to debug my environment and it turned out that the reason was that I had added my config into
.sops.ymlinstead of.sops.yaml.This is my first contribution into sops and I'm happy to hear feedback and improve this. Thanks in advance 🙇