-
-
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
Alias 'ipfs --version' to 'ipfs version' #2990
Conversation
Please introduce sharness test case for it, so if we do refactor of it in future it doesn't get lost. |
I'll look into that tonight, thanks! |
Thank you, @csasarak! |
License: MIT Signed-off-by: Chris Sasarak <chris.sasarak@gmail.com>
1. Test that ipfs --version has a 0 exit status 2. Check the ipfs --version output matches ipfs version License: MIT Signed-off-by: Chris Sasarak <chris.sasarak@gmail.com>
I've added two tests that I could think of, details are in the commit message. |
LGTM |
SGTM |
ipfs version > version.txt && | ||
ipfs --version > version2.txt && | ||
diff version2.txt version.txt || | ||
test_fsh ipfs --version |
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.
Maybe use test_cmp version.txt version2.txt
instead of those last two lines.
Addresses Issue #2976. This is a pretty simple method since it looks like the main ipfs command pretty much just parses and launches the others. If you think it is likely that we'll have more 'alias' type things that people will want on ipfs (not its subcommands) in the future, I can probably write something (like a dict) mapping aliases to real commands.