From b209fd002b9ef31307f6f604254ad84a6628d5b0 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Tue, 7 Feb 2017 11:24:09 +0100 Subject: [PATCH 1/1] smpirun: gracefuly handle the case where the user forgets to give a program to execute --- src/smpi/smpirun.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 9e5689e5c1..28ae8b0829 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -241,6 +241,13 @@ while true; do esac done +# check if we still have at least one parameter beyond options +if [ $# -eq 0 ] +then + usage + exit +fi + if [ -n "$WRAPPER" ]; then EXEC="$WRAPPER $1" else -- 2.20.1