Code cleanup and improvements.
This commit is contained in:
@@ -507,36 +507,6 @@ def _resolve_runtime_path_case(root: Path, relative: PurePosixPath) -> Path:
|
||||
return cursor
|
||||
|
||||
|
||||
def run_proton_prefix_command(
|
||||
paths: AppPaths,
|
||||
selection: RuntimeSelection,
|
||||
runner: CommandRunner,
|
||||
arguments: Sequence[str],
|
||||
*,
|
||||
check: bool = True,
|
||||
timeout_seconds: float = 60.0,
|
||||
) -> CommandOutcome:
|
||||
"""Run a maintenance command in the pinned Proton 7 prefix."""
|
||||
|
||||
if selection.kind not in {"proton7", "proton7-container"}:
|
||||
raise RuntimeErrorPT("the login trace requires the pinned Proton 7 runtime")
|
||||
if not selection.proton_path or not selection.steam_root:
|
||||
raise RuntimeErrorPT("incomplete Proton 7 runtime selection")
|
||||
return runner.run(
|
||||
[
|
||||
sys.executable,
|
||||
"-m",
|
||||
"ptlinux.proton_compat",
|
||||
selection.proton_path,
|
||||
"runinprefix",
|
||||
*arguments,
|
||||
],
|
||||
env_overrides=_proton_environment(paths, selection),
|
||||
timeout_seconds=timeout_seconds,
|
||||
check=check,
|
||||
)
|
||||
|
||||
|
||||
def run_runtime_prefix_command(
|
||||
paths: AppPaths,
|
||||
selection: RuntimeSelection,
|
||||
|
||||
Reference in New Issue
Block a user