We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65ac8ef commit d902724Copy full SHA for d902724
cmd/incus/action.go
@@ -430,6 +430,19 @@ func (c *cmdAction) Run(cmd *cobra.Command, args []string) error {
430
return fmt.Errorf(i18n.G("--console can't be used with --all"))
431
}
432
433
+ if len(names) > 1 {
434
+ idx := slices.Index(names, "vga")
435
+ idx2 := slices.Index(names, "console")
436
+ if idx == -1 || (idx2 != -1 && idx > idx2) {
437
+ idx = idx2
438
+ }
439
+
440
+ if idx != -1 {
441
+ c.flagConsole = names[idx]
442
+ names = append(names[0:idx], names[idx+1:]...)
443
444
445
446
if len(names) != 1 {
447
return fmt.Errorf(i18n.G("--console only works with a single instance"))
448
0 commit comments