-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Setting credentials fails when password starts with a hyphen #4699
Comments
We ran into the same issue due to the @twoolie how did you find the workaround using |
this is just regular behaviour for command line programs. eg try to See also #4853. Nothing to do here. |
Agreed, this is standard behavior of CLI applications, and there is no need for a workaround as the proper solution ( |
we could modify the input maybe, poetry config key==--value would get around it. |
I'm personally not enthused about adding some custom tokenization/splitting when what we have works fine and is stable, especially as certain usernames with whatever token we choose would become impossible to express. |
@paketb0te the workaround works well. I feel that it's a good enough solution. I think that it should be documented and that the examples in the docs should always use |
@twoolie yeah it works great, I just was not aware that this exists (using double hyphen to stop parsing options) 😄 I agree there is nothing to fix here, except maybe adding a hint in the docs / FAQ. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I am on the latest Poetry version.
I have searched the issues of this repo and believe that this is not a duplicate.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).OS version and name: NixOS 21.05
Poetry version: 1.1.11
Issue
When setting repository credentials with
poetry config http-basic.custom-repo gitlab-ci-token ${GITLAB_JOB_TOKEN}
the command will fail any time the GITLAB_JOB_TOKEN begins with a hyphen. The command line parser tries to treat the password as an option.The current workaround is to use double hyphen e.g.
poetry config http-basic.custom-repo -- gitlab-ci-token ${GITLAB_JOB_TOKEN}
This should either be fixed in the option parser, or the workaround documented in the manual.
The text was updated successfully, but these errors were encountered: