[Libguestfs] [PATCH] lib: command: Print command before running it with guestfs_int_cmd_pipe_run.

Richard W.M. Jones rjones at redhat.com
Mon Sep 11 15:07:56 UTC 2017


Unlike ordinary guestfs_int_cmd_run, the pipe version did not print
the command it was about to run when debugging was enabled.

Fixes commit e98bb8692929a037f3452686719504aea31f311d.
---
 lib/command.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/command.c b/lib/command.c
index 970acf6e5..bc469de59 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -791,6 +791,9 @@ guestfs_int_cmd_pipe_run (struct command *cmd, const char *mode)
 
   finish_command (cmd);
 
+  if (cmd->g->verbose)
+    debug_command (cmd);
+
   /* Various options cannot be used here. */
   assert (!cmd->capture_errors);
   assert (!cmd->stdout_callback);
-- 
2.13.2




More information about the Libguestfs mailing list