Skip to content

Commit

Permalink
Improve response when pex is called without any arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
petere committed Jun 7, 2014
1 parent e084f57 commit 1472fdf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pex
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,10 @@ psql() {
}


if [ $# -eq 0 ]; then
error "usage: pex COMMAND [PACKAGE] (try \" --help\")"
fi

case $1 in
--help|-\?)
echo "$usage"; exit 0;;
Expand Down
10 changes: 10 additions & 0 deletions t/misc.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

. ./t/libtap.sh
. ./t/fixtures.sh

plan 1

ok_program 'pex without arguments' 1 'pex: usage: pex COMMAND [PACKAGE] (try " --help")' pex

cleanup

0 comments on commit 1472fdf

Please sign in to comment.