Fixed issues with gamescope not properly launching.
This commit is contained in:
@@ -99,10 +99,14 @@ class CommandRunner:
|
||||
check: bool = True,
|
||||
stream_output: bool = False,
|
||||
output_line_filter: OutputLineFilter | None = None,
|
||||
pass_fds: Sequence[int] = (),
|
||||
) -> CommandOutcome:
|
||||
arguments = [str(value) for value in argv]
|
||||
if not arguments:
|
||||
raise ValueError("command argv cannot be empty")
|
||||
inherited_fds = tuple(dict.fromkeys(pass_fds))
|
||||
if any(not isinstance(value, int) or value < 0 for value in inherited_fds):
|
||||
raise ValueError("inherited file descriptors must be non-negative integers")
|
||||
overrides = dict(env_overrides or {})
|
||||
started = time.monotonic()
|
||||
if self.dry_run:
|
||||
@@ -128,6 +132,7 @@ class CommandRunner:
|
||||
timeout_seconds=timeout_seconds,
|
||||
started=started,
|
||||
output_line_filter=output_line_filter,
|
||||
pass_fds=inherited_fds,
|
||||
)
|
||||
else:
|
||||
try:
|
||||
@@ -142,6 +147,7 @@ class CommandRunner:
|
||||
stderr=subprocess.PIPE,
|
||||
timeout=timeout_seconds,
|
||||
check=False,
|
||||
pass_fds=inherited_fds,
|
||||
)
|
||||
outcome = CommandOutcome(
|
||||
argv=arguments,
|
||||
@@ -176,6 +182,7 @@ class CommandRunner:
|
||||
timeout_seconds: float,
|
||||
started: float,
|
||||
output_line_filter: OutputLineFilter | None,
|
||||
pass_fds: tuple[int, ...],
|
||||
) -> CommandOutcome:
|
||||
process = subprocess.Popen(
|
||||
arguments,
|
||||
@@ -188,6 +195,7 @@ class CommandRunner:
|
||||
stderr=subprocess.PIPE,
|
||||
bufsize=1,
|
||||
start_new_session=True,
|
||||
pass_fds=pass_fds,
|
||||
)
|
||||
stdout = BoundedTextCapture()
|
||||
stderr = BoundedTextCapture()
|
||||
|
||||
Reference in New Issue
Block a user