[PATCH console-proxy 6/6] virtconsoleresolveradm: Fix -c handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-c / --connect <Qemu-URI> does not work:
> $ build/virtconsoleresolveradm -c qemu:///session enable $VM
> Error: unknown shorthand flag: 'c' in -c

<https://github.com/spf13/cobra#persistent-flags>

Signed-off-by: Philipp Hahn <hahn@xxxxxxxxxxxxx>
---
 cmd/virtconsoleresolveradm/cmd/root.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/virtconsoleresolveradm/cmd/root.go b/cmd/virtconsoleresolveradm/cmd/root.go
index 7aaca47..d4001e4 100644
--- a/cmd/virtconsoleresolveradm/cmd/root.go
+++ b/cmd/virtconsoleresolveradm/cmd/root.go
@@ -42,5 +42,5 @@ var (
 )
 
 func init() {
-	RootCmd.Flags().StringVarP(&connect, "connect", "c", "qemu:///system", "Libvirt connection URI")
+	RootCmd.PersistentFlags().StringVarP(&connect ,"connect", "c", "qemu:///system", "Libvirt connection URI")
 }
-- 
2.20.1


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux