From 962bd45184bfc8cd96a021d1268ac1c135bcf61f Mon Sep 17 00:00:00 2001 From: Serge Rehbinder Date: Tue, 17 May 2016 09:54:24 +0200 Subject: [PATCH] bug fix in clean command --- commands/clean.py | 7 ++++++- complete_sat.sh | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/commands/clean.py b/commands/clean.py index 7bf04c3..03b9342 100644 --- a/commands/clean.py +++ b/commands/clean.py @@ -143,6 +143,7 @@ def run(args, runner, logger): # check that the command has been called with an application src.check_config_has_application( runner.cfg ) + # Get the list of products to threat products_infos = prepare.get_products_list(options, runner.cfg, logger) # Construct the list of directories to suppress @@ -159,10 +160,14 @@ def run(args, runner, logger): if options.build: l_dir_to_suppress += get_build_directories(products_infos) - if options.source: + if options.source or options.sources_without_dev: l_dir_to_suppress += get_source_directories(products_infos, options.sources_without_dev) + if len(l_dir_to_suppress) == 0: + logger.write(src.printcolors.printcWarning(_("Nothing to suppress\n"))) + return + # Check with the user if he really wants to suppress the directories if not runner.options.batch: logger.write(_("Remove the following directories ?\n"), 1) diff --git a/complete_sat.sh b/complete_sat.sh index ac6f8e0..c56bb38 100755 --- a/complete_sat.sh +++ b/complete_sat.sh @@ -80,7 +80,7 @@ _salomeTools_complete() # first argument => show available commands if [[ ${argc} == 1 ]] then - opts="config log testcommand source patch prepare --help" + opts="config log testcommand source patch prepare environ --help" COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 fi @@ -154,6 +154,11 @@ _salomeTools_complete() COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; + environ) + opts="--products --shell --prefix --target" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + ;; *) return 0 ;; esac -- 2.30.2