Improve shell_cmd error output when quiet=1.
When quiet is 1, the "Issuing:" line does not get printed. So, when
an error occurs, the user has no idea what the failing command is.
With this change, the command_string contents will be included in the
error output.
Change-Id: I23813308397476eae8a70b2bd8c2c6af98e98030
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/gen_cmd.py b/lib/gen_cmd.py
index 81f64f0..52f255a 100644
--- a/lib/gen_cmd.py
+++ b/lib/gen_cmd.py
@@ -432,6 +432,8 @@
if shell_rc in allowed_shell_rcs:
break
err_msg = "The prior shell command failed.\n"
+ if quiet:
+ err_msg += gp.sprint_var(command_string)
if command_timed_out:
err_msg += gp.sprint_var(command_timed_out)
err_msg += gp.sprint_var(time_out)