Skip to content

Commit

Permalink
Improve message when wb is called without arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
andreabedini authored and mgmeier committed Apr 29, 2024
1 parent 37e14d1 commit 51b118a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nix/workbench/wb
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,13 @@ do case "$1" in
* ) break;; esac; shift; done

main() {
local op=${1:?$(usage_main)}; shift || true
# if $1 is not set ...
if [ ! -v 1 ]; then
usage_main
exit 1
fi
local op=$1
shift

case "$op" in
## Public, primary:
Expand Down

0 comments on commit 51b118a

Please sign in to comment.