From e94782ae03b38724d7675622d987bbbacbe34b0a Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 22 Jan 2018 00:46:33 -0500 Subject: [PATCH] home-manager: check whether a command is passed "set -u" treats unset variables as an error, and $1 is unbound when no command is passed. --- home-manager/home-manager | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/home-manager/home-manager b/home-manager/home-manager index 9d10e61e..7187740b 100644 --- a/home-manager/home-manager +++ b/home-manager/home-manager @@ -337,6 +337,11 @@ done # Get rid of the options. shift "$((OPTIND-1))" +if [ $# -eq 0 ]; then + doHelp >&2 + exit 1 +fi + cmd="$1" shift 1