From 2696e5a0676c1ba39ee7f97b48ef65f5dc986d4f Mon Sep 17 00:00:00 2001 From: Rick Harris Date: Mon, 18 Aug 2014 13:53:42 -0500 Subject: [PATCH] Guard for worlddump in case LOGDIR is undefined If LOGDIR is undefined, we'll end up calling worldump with the `-d` option but pass in an empty string as the option value. This causes an argument parsing error inside worlddump. The proposed fix is to detect if LOGDIR is undefined, and if so, omit the `-d` argument. Change-Id: I77968849ebd3e3bebd2e5929b87b60fc1b6541bf Closes-Bug: 1333321 --- stack.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stack.sh b/stack.sh index 7a7655c575..9b9c2456c6 100755 --- a/stack.sh +++ b/stack.sh @@ -631,7 +631,11 @@ function exit_trap { if [[ $r -ne 0 ]]; then echo "Error on exit" - ./tools/worlddump.py -d $LOGDIR + if [[ -z $LOGDIR ]]; then + ./tools/worlddump.py + else + ./tools/worlddump.py -d $LOGDIR + fi fi exit $r