From 219aa5295824cb341fbcff875bec897c7d632448 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 17 Dec 2012 17:00:13 +0000 Subject: [PATCH] Fix disk-image-create's getopt error handling: We originally checked the return code of getopt, but subsequently a debugging echo has been inserted and now we are checking the return code of "echo", which is very rarely going to be useful. Change-Id: I054fecaf6576d5e9d42b07159bba7d50335bf6cc --- bin/disk-image-create | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/disk-image-create b/bin/disk-image-create index 43898ff3..d0b4f90f 100755 --- a/bin/disk-image-create +++ b/bin/disk-image-create @@ -32,8 +32,8 @@ function show_options () { COMPRESS_IMAGE="true" TEMP=`getopt -o a:ho:xu -n $SCRIPTNAME -- "$@"` -echo "XXX $TEMP" if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi +echo "XXX $TEMP" # Note the quotes around `$TEMP': they are essential! eval set -- "$TEMP"