docker-credential-helpers
docker-credential-helpers copied to clipboard
Also report Helper version
I am using the amazon-ecr-credential-helper, which leverages docker-credential-helpers/credentials. When I run amazon-ecr-credential-helper version it reports 0.6.3 (the version of this library) instead of its own version (0.4.0), which is very confusing. I think it would be helpful to allow the Helper implementation to also include a Version() string method that, if implemented, is printed by the version command instead.
See https://github.com/awslabs/amazon-ecr-credential-helper/issues/206
I think this is a general issue though, not just for the amazon-ecr-credential-helper. When you run the command, the usage text says you can specify version, but that yields a totally unexpected result from the perspective of the client. I think it would make more sense not to force each helper implementation to independently define a -v flag like that.
For a gazillion-ish other tools version returns the version of the tool and not the version of one library dependency 😄
This was a really poor decision, and will continue to waste human time until changed. In the meantime, at the least the usage text could try to warn the user.
Usage: docker-credential-ecr-login <store|get|erase|list|version>
IMPORTANT: 'version' is not the version of docker-credential-ecr-login but the version of the docker library it uses.
Use '-v' to get the version of this tool.