From ad4084868801613182fa7881262ddb731b2f32b3 Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Tue, 21 Apr 2015 15:51:23 +0530 Subject: [PATCH] added check to pass options with --all option --- config/bash_completion.d/ee_auto.rc | 5 +++-- ee/cli/plugins/site.py | 13 +++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/config/bash_completion.d/ee_auto.rc b/config/bash_completion.d/ee_auto.rc index a80c50f0..fa227087 100644 --- a/config/bash_completion.d/ee_auto.rc +++ b/config/bash_completion.d/ee_auto.rc @@ -262,9 +262,10 @@ _ee_complete() "--all") if [ ${COMP_WORDS[1]} == "clean" ]; then retlist="--memcache --opcache --fastcgi" - else + elif [ ${COMP_WORDS[2]} == "delete" ]; then retlist="--db --files" - + else + retlist="" fi ret="${retlist[@]/$prev}" COMPREPLY=( $(compgen \ diff --git a/ee/cli/plugins/site.py b/ee/cli/plugins/site.py index e0c5aa56..13647d7e 100644 --- a/ee/cli/plugins/site.py +++ b/ee/cli/plugins/site.py @@ -613,8 +613,17 @@ class EESiteUpdateController(CementBaseController): def default(self): pargs = self.app.pargs - if pargs.all and pargs.site_name: - Log.error(self, "`--all` option cannot be used with site name") + if pargs.all: + if pargs.site_name: + Log.error(self, "`--all` option cannot be used with site name" + " provided") + if pargs.html: + Log.error(self, "No site can be updated to html") + if not (pargs.php or + pargs.mysql or pargs.wp or pargs.wpsubdir or + pargs.wpsubdomain or pargs.w3tc or pargs.wpfc or + pargs.wpsc or pargs.hhvm or pargs.pagespeed): + Log.error(self, "Please provide options to update sites.") if pargs.all: sites = getAllsites(self)