Skip to content

Commit

Permalink
umu_run: only call list.extend once
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Apr 29, 2024
1 parent e8ebdb5 commit 57e2810
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions umu/umu_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,25 +256,38 @@ def build_command(
err: str = "The following file was not found in PROTONPATH: proton"
raise FileNotFoundError(err)

if opts:
command.extend(
[
root.joinpath("reaper").as_posix(),
f"UMU_ID={env.get('UMU_ID')}",
"--",
local.joinpath("umu").as_posix(),
"--verb",
verb,
"--",
Path(env.get("PROTONPATH")).joinpath("proton").as_posix(),
verb,
env.get("EXE"),
*opts,
],
)
return command
command.extend(
[
root.joinpath("reaper").as_posix(),
f"UMU_ID={env.get('UMU_ID')}",
"--",
]
)
command.extend([local.joinpath("umu").as_posix(), "--verb", verb, "--"])
command.extend(
[
local.joinpath("umu").as_posix(),
"--verb",
verb,
"--",
Path(env.get("PROTONPATH")).joinpath("proton").as_posix(),
verb,
env.get("EXE"),
]
],
)

if opts:
command.extend([*opts])

return command


Expand Down

0 comments on commit 57e2810

Please sign in to comment.