Accept -version too

This commit is contained in:
Seth Vargo
2015-04-28 12:57:44 -04:00
parent 899eb248fc
commit efbe3fc404

View File

@@ -15,7 +15,7 @@ func RunCustom(args []string, commands map[string]cli.CommandFactory) int {
// Get the command line args. We shortcut "--version" and "-v" to
// just show the version.
for _, arg := range args {
if arg == "-v" || arg == "--version" {
if arg == "-v" || arg == "-version" || arg == "--version" {
newArgs := make([]string, len(args)+1)
newArgs[0] = "version"
copy(newArgs[1:], args)