← Back to team overview

cloud-init-dev team mailing list archive

[Merge] ~smoser/cloud-init:fix/run-centos-unbound-var into cloud-init:master

 

Scott Moser has proposed merging ~smoser/cloud-init:fix/run-centos-unbound-var into cloud-init:master.

Commit message:
tools/run-centos: make running with no argument show help.

If you ran tools/run-centos without an argument it would fail due
to 'set -u' like:
  ./tools/run-centos: line 266: 1: unbound variable


Requested reviews:
  cloud-init commiters (cloud-init-dev)

For more details, see:
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/327896
-- 
Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:fix/run-centos-unbound-var into cloud-init:master.
diff --git a/tools/run-centos b/tools/run-centos
index b10e3bc..d44d514 100755
--- a/tools/run-centos
+++ b/tools/run-centos
@@ -262,7 +262,7 @@ main() {
     return 0
 }
 
-if [ "$1" = "prep" ]; then
+if [ "${1:-}" = "prep" ]; then
     shift
     prep "$@"
 else