nixos/test-driver: fix graphics for VM
`-nographic` should only be set if no display is available. Otherwise, tools such as `nixos-build-vms(8)` will never open up a graphical display.
This commit is contained in:
committed by
David Arnold
parent
b2e59bcf77
commit
3f63e3ce65
@@ -246,7 +246,7 @@ class StartCommand:
|
|||||||
) -> str:
|
) -> str:
|
||||||
display_opts = ""
|
display_opts = ""
|
||||||
display_available = any(x in os.environ for x in ["DISPLAY", "WAYLAND_DISPLAY"])
|
display_available = any(x in os.environ for x in ["DISPLAY", "WAYLAND_DISPLAY"])
|
||||||
if display_available:
|
if not display_available:
|
||||||
display_opts += " -nographic"
|
display_opts += " -nographic"
|
||||||
|
|
||||||
# qemu options
|
# qemu options
|
||||||
|
|||||||
Reference in New Issue
Block a user