Open Nowaker opened 5 years ago
Unfortunately, the name I chose was
S3CMD_CONFIG
.
What else could one possibly expect with an environment flag namespaced like that?
Ah ah true! @Nowaker But that being said, currently i noticed a few wrong behaviors when config file or option are incorrect, like an incorrect error message. I have planned to rework that part of the code to fix that, and I hope that it would have the side effect to also fix your case.
@jhabdas An error message, if my stuff is incorrect in application's eyes. Compare s3cmd
to kubectl
:
[nowaker@nwkr-desktop ~]$ S3CMD_CONFIG=/tmp/blah s3cmd ls s3://blah
ERROR: S3 error: 403 (InvalidAccessKeyId): The AWS Access Key Id you provided does not exist in our records.
[nowaker@nwkr-desktop ~]$ kubectl --kubeconfig /tmp/blah get pods
error: stat /tmp/blah: no such file or directory
@fviard Thanks. I think a success story would be this behavior:
S3CMD_CONFIG
env var is specified AND file doesn't exist, isn't readable, or has syntax errors, fail.--config
param is specified AND file doesn't exist, isn't readable, or has syntax errors, fail.~/.s3cfg
file exists AND isn't readable, or has syntax errors, fail.
I set a custom variable in my CI. Unfortunately, the name I chose was
S3CMD_CONFIG
. I didn't know it was used bys3cmd
. This cost me two hours of trying to find what was incorrect.Please provide a human-friendly error message when S3CMD_CONFIG contains garbage (in s3cmd's eyes).