mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
NixOS Test driver: Display Qemu windows on macOS in interactive mode
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import base64
|
||||
import io
|
||||
import os
|
||||
import platform
|
||||
import queue
|
||||
import re
|
||||
import select
|
||||
@@ -199,7 +200,13 @@ class StartCommand:
|
||||
allow_reboot: bool = False,
|
||||
) -> str:
|
||||
display_opts = ""
|
||||
|
||||
display_available = any(x in os.environ for x in ["DISPLAY", "WAYLAND_DISPLAY"])
|
||||
if platform.system() == "Darwin":
|
||||
# We have no DISPLAY variables on macOS and seemingly no better way
|
||||
# to find out
|
||||
display_available = "TERM_PROGRAM" in os.environ
|
||||
|
||||
if not display_available:
|
||||
display_opts += " -nographic"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user