From 3f274d02ce7ddcc7f9fe1b281db230c5dce30670 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Fri, 5 Jun 2015 07:57:55 +0100 Subject: [PATCH] make `weave launch` args insensitive to order Fixes #816. --- weave | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/weave b/weave index bedc738d..4bd26c4b 100755 --- a/weave +++ b/weave @@ -864,7 +864,8 @@ case "$COMMAND" in shift 1 fi CONTAINER_PORT=$PORT - while true ; do + ARGS="" + while [ $# -gt 0 ] ; do case "$1" in -password) [ $# -gt 1 ] || usage @@ -884,10 +885,12 @@ case "$COMMAND" in shift 2 ;; *) - break + ARGS="$ARGS '$(echo "$1" | sed "s|'|'\"'\"'|g")'" + shift ;; esac done + eval "set -- $ARGS" # Set WEAVE_DOCKER_ARGS in the environment in order to supply # additional parameters, such as resource limits, to docker # when launching the weave container.