-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
commands/pin: use new cmds lib #5674
Conversation
a3a91c2
to
4f68430
Compare
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.
Due to an oddity with how parsing arguments from Stdin works, when ever you have a command that can accept more than one argument from Stdin you must either call req.ParseBodyArgs()
before using req.Arguments
or iterate over them with req.BodyArgs()
, with the former being preferred for now. If you don't only the first argument will be read from Stdin.
You can test this my trying to pass two arguments via the command line to an affected command and then try again via Stdin.
@kevina I found that req.Arguments only contain the first arg if I pass two arguments from Stdin |
Correct. To fix this you need to call |
@overbool this needs a rebase now. I would like to get this in ASAP. Let me know if you need any help with this. |
4c19660
to
c7d6589
Compare
@kevina Sorry for my delay. I had replaced the |
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.
One nit. But otherwise LGTM.
c7d6589
to
d856824
Compare
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.
LGTM.
So, technically, this breaks |
License: MIT Signed-off-by: Overbool <overbool.xu@gmail.com>
License: MIT Signed-off-by: Overbool <overbool.xu@gmail.com>
License: MIT Signed-off-by: Overbool <overbool.xu@gmail.com>
License: MIT Signed-off-by: Overbool <overbool.xu@gmail.com>
Otherwise, we break the HTTP API (slightly). License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
86e8a15
to
5c15857
Compare
Refer: #5664
License: MIT
Signed-off-by: Overbool overbool.xu@gmail.com