mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
fish: glob should only print commands when trace mode is enabled.
This commit is contained in:
12
fish/glob.c
12
fish/glob.c
@@ -140,12 +140,14 @@ glob_issue (char *cmd, int argc,
|
||||
argv[argc] = NULL;
|
||||
|
||||
again:
|
||||
printf ("%s", argv[0]);
|
||||
for (i = 1; i < argc; ++i) {
|
||||
argv[i] = globs[i][posn[i]];
|
||||
printf (" %s", argv[i]);
|
||||
if (guestfs_get_trace (g)) {
|
||||
printf ("%s", argv[0]);
|
||||
for (i = 1; i < argc; ++i) {
|
||||
argv[i] = globs[i][posn[i]];
|
||||
printf (" %s", argv[i]);
|
||||
}
|
||||
printf ("\n");
|
||||
}
|
||||
printf ("\n");
|
||||
|
||||
if (issue_command (argv[0], &argv[1], NULL) == -1)
|
||||
*r = -1; /* ... but don't exit */
|
||||
|
||||
Reference in New Issue
Block a user