-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
fix: support token with space like Bearer xxxxx
#155
Conversation
I guess, having token like `Bearer xxxx` is the cause of an error like ```sh -- Running release-plz release -- error: unexpected argument '***' found Usage: release-plz release [OPTIONS] For more information, try '--help'. ```
The test is failing. Did you test your branch and check that this fixed your issue? |
improved the error message here: release-plz/release-plz#1682 |
No, the workflow were not activated on my fork. |
ok, please also test your action directly against your project to check if this fix solves your issue. |
"${CONFIG_PATH[@]}"\ | ||
"${ALT_REGISTRY[@]}"\ | ||
"${MANIFEST_PATH[@]}"\ | ||
"${BACKEND[@]}"\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this trick used to work with whitespace? If yes, why are we using it also in the backend, which is one world only?
Same for ALT_REGISTRY probably
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes this trick is to keep the separation of argument clean as defined in the array. I also apply it BACKEND and ALT_REGISTRY for:
- consistency (same pattern for every arguments fragment)
- to guide if new argument should be added in the future (no question about which "form" to use)
doesn't |
No I tried it, same issue than with my first try with single quote, the double quote is included into the arguments when combined with To test the various approach locally I used a small script to display every args. #!/bin/bash
for i in "$@"; do
echo "$i"
done bash-5.2$ V2="hello \"foo bar\""
bash-5.2$ ./my_cmd.sh ${V2}
hello
"foo
bar" I remembered the tricks about array, but was not sure about the syntax, so quick search on SO: https://superuser.com/questions/360966/how-do-i-use-a-bash-variable-string-containing-quotes-in-a-command |
FYI, the github workflow aren't triggered on my fork (I enable them, but no trigger). |
Ok so this trick allows to use |
Also, "Bearer" is already set by release-plz: |
No, this trick allows to NOT have
|
I don't need "Bearer" for github token, but for crates registry's token |
Co-authored-by: Marco Ieni <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm this close to rewrite this bash script in typescript 😂
Thanks!
released 👍 |
I guess, having the input
token
set with space likeBearer xxxx
, is the cause of an error like(the *** is the output, hidden by github workflow because comes from a secret)