From 47727e23f1c20cf3c47e1de5bcd917f95dd8fdde Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sat, 16 May 2015 02:42:10 +0100 Subject: [PATCH] fix quoting, unbreaking multi-cidr `weave start/attach/hide` Fixes #670. --- weave | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weave b/weave index 06a3dfc7..6dfeb835 100755 --- a/weave +++ b/weave @@ -651,8 +651,8 @@ ipam_claim() { # If we don't already have any CIDRs passed from the command-line, get one from IPAM # $1 is the name of the container and $2, if set, is the ID to use inside IPAM get_ipam_cidr() { - if [ -z $CIDR_ARGS ] ; then - if [ -z $2 ] ; then + if [ -z "$CIDR_ARGS" ] ; then + if [ -z "$2" ] ; then # get the long form of the container ID if ! status=$(docker inspect --format='{{.State.Running}} {{.Id}}' $1 2>/dev/null); then echo "Error: No such container: $1" >&2