Browse Source

Add some more error checking

Samuel W. Flint 2 months ago
parent
commit
9f2935d031
1 changed files with 5 additions and 0 deletions
  1. 5 0
      background-job

+ 5 - 0
background-job

@@ -37,6 +37,11 @@ if [ -z "${NAME}" ] ; then
     exit 1
 fi
 
+if [ $# -lt 1 ] ; then
+    echo "A command is required." >&2
+    exit 1
+fi
+
 RUN_SCRIPT=$(mktemp)
 
 cat <<EOF > "${RUN_SCRIPT}"