From 76ccc53eeef119fdc50645bf127ad636d380221a Mon Sep 17 00:00:00 2001 From: Arbaaz Shafiq Date: Wed, 26 Oct 2022 19:30:34 +0530 Subject: [PATCH 1/2] Don't show command if quiet: true Don't print the command if quiet option is set to true and no description is given. --- dotbot/plugins/shell.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dotbot/plugins/shell.py b/dotbot/plugins/shell.py index bbdcb6d..7092158 100644 --- a/dotbot/plugins/shell.py +++ b/dotbot/plugins/shell.py @@ -42,10 +42,11 @@ class Shell(dotbot.Plugin): else: cmd = item msg = None - if msg is None: + if quiet: + if msg is not None: + self._log.lowinfo("%s" % msg) + elif msg is None: self._log.lowinfo(cmd) - elif quiet: - self._log.lowinfo("%s" % msg) else: self._log.lowinfo("%s [%s]" % (msg, cmd)) stdout = options.get("stdout", stdout) From 5d34d005e8e0c81bace65a7c2d168985bc17018b Mon Sep 17 00:00:00 2001 From: Anish Athalye Date: Thu, 17 Nov 2022 13:26:32 -0500 Subject: [PATCH 2/2] Fix test --- test/tests/shell-quiet.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/tests/shell-quiet.bash b/test/tests/shell-quiet.bash index a69f6c5..78309bc 100644 --- a/test/tests/shell-quiet.bash +++ b/test/tests/shell-quiet.bash @@ -20,9 +20,9 @@ test_expect_success 'run 2' ' EOF ' -# when no description, expect to see command +# when no description, expect no output test_expect_success 'run 3' ' -(run_dotbot | grep "echo banana") <