Skip to content

Commit 680e356

Browse files
committed
Merge pull request moovweb#138 from uhoh-itsmaciek/respond-to-requests-for-help
Respond to help command by showing usage info
2 parents f7916c9 + e66076b commit 680e356

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bin/gvm

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ else
3434
if [ -f "$GVM_ROOT/scripts/$command" ]; then
3535
shift
3636
"$GVM_ROOT/scripts/$command" "$@"
37-
elif [[ -n $command ]]; then
38-
display_fatal "Unrecognized command line argument: '$command'"
39-
else
37+
elif [[ -z $command || $command = help ]]; then
4038
echo "Usage: gvm [command]
4139
4240
Description:
@@ -47,6 +45,7 @@ Commands:
4745
get - gets the latest code (for debugging)
4846
use - select a go version to use (--default to set permanently)
4947
diff - view changes to Go root
48+
help - display this usage text
5049
implode - completely remove gvm
5150
install - install go versions
5251
uninstall - uninstall go versions
@@ -58,5 +57,7 @@ Commands:
5857
pkgset - manage go packages sets
5958
pkgenv - edit the environment for a package set
6059
"
60+
else
61+
display_fatal "Unrecognized command line argument: '$command'"
6162
fi
6263
fi

0 commit comments

Comments
 (0)