mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 12:05:17 +00:00
virsh: re-fix help printing without connection
Re-do 0217089 so it does not add regression for commit c0726e0 that allowed to print help without making a connection to the daemon.
This commit is contained in:
parent
ed5c929777
commit
384dde557b
@ -962,14 +962,16 @@ main(int argc, char **argv)
|
||||
if (!vshInit(ctl, cmdGroups, NULL))
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
ctl->connname = vshStrdup(ctl, virGetEnvBlockSUID("VIRSH_DEFAULT_CONNECT_URI"));
|
||||
|
||||
if (!virshParseArgv(ctl, argc, argv) ||
|
||||
!virshInit(ctl)) {
|
||||
virshDeinit(ctl);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (!ctl->connname)
|
||||
ctl->connname = vshStrdup(ctl,
|
||||
virGetEnvBlockSUID("VIRSH_DEFAULT_CONNECT_URI"));
|
||||
|
||||
if (!ctl->imode) {
|
||||
ret = vshCommandRun(ctl, ctl->cmd);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user