From 76a3b022e5582220ca76969d7099b9fe94efe7f7 Mon Sep 17 00:00:00 2001 From: Joseph Luo Date: Tue, 22 Nov 2016 14:32:07 +0000 Subject: [PATCH] Fix for using multiple flags with adop compose init --- cmd/compose | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/cmd/compose b/cmd/compose index df0ca0dc9..64e281ceb 100755 --- a/cmd/compose +++ b/cmd/compose @@ -86,18 +86,27 @@ prep_env() { init() { -case "$1" in - --without-pull) - export PULL="NO" - ;; - --without-load) - export LOAD="NO" - ;; - --with-stdout) - export LOGS="NO" - ;; - *) -esac +while [[ $1 ]]; do + case "$1" in + --without-pull) + export PULL="NO" + shift + ;; + --without-load) + export LOAD="NO" + shift + ;; + --with-stdout) + export LOGS="NO" + shift + ;; + *) + echo "Unrecognized option: $1" + help + exit 1 + ;; + esac +done echo ' ### ######## ####### ########