-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
lab clone
without url causes panic instead of printing help
#11
Labels
Comments
zaquestion
added a commit
that referenced
this issue
Sep 14, 2017
@hasLeland Thanks for reporting! I've put in a fix. This issue still needs tests to close. |
zaquestion
added a commit
that referenced
this issue
Sep 14, 2017
[#11] (clone) fixes panic on no arguments
bmess
added a commit
to bmess/lab
that referenced
this issue
Oct 14, 2017
I think using the Args argument might be cleaner.
bmess
added a commit
to bmess/lab
that referenced
this issue
Oct 14, 2017
I think using the Args argument might be cleaner.
I apologize for beating a dead horse but I think this might be an elegant solution for an elegant tool 💯 |
zaquestion
added a commit
that referenced
this issue
Oct 19, 2017
…pdates to cobra that might assist with a more idiomatic fix
zaquestion
added a commit
that referenced
this issue
Oct 19, 2017
(vendor) Update all vendors, primarily driven by issue #11 and some updates to cobra that might assist with a more idiomatic fix
I believe this is fixed. Tested with |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What was expected?
When running
git clone
without specifying a url, I get a help message:What happened instead?
When I ran
lab clone
without a url,lab
panic'd:How might this be fixed?
From what I can see in the
cmd/root.go
file, the problem is in an unchecked slice of theos.Args
slice on line 81. Directly above that line is a somewhat confusing comment which may or may not have anything to do with this issue, I had a hard time understanding it, though it may be of some use to whoever choses to fix this.The change would be to check if
clone
has been provided without any additional arguments/parameters, and if it has, to print a help message in some way. The printing of a help message could be done by dropping down to gits help message or by printinglab
s own custom help message.The text was updated successfully, but these errors were encountered: