mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
virsh: qemu-monitor-command: Don't print extra newline with --pretty
The prettified JSON string already contains a newline so don't print another one. This allows to pipe the json output (in conjunction with the --quiet option) to files without having to truncate them afterwards.
This commit is contained in:
parent
27bdc0af00
commit
8dbc95cbd1
@ -8972,6 +8972,7 @@ cmdQemuMonitorCommand(vshControl *ctl, const vshCmd *cmd)
|
||||
if (pretty && (tmp = virJSONValueToString(pretty, true))) {
|
||||
VIR_FREE(result);
|
||||
result = tmp;
|
||||
virTrimSpaces(result, NULL);
|
||||
} else {
|
||||
vshResetLibvirtError();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user