Skip to content

Commit

Permalink
fix[close #3559]: bottles-cli run crashes if you don't specify either…
Browse files Browse the repository at this point in the history
… --executable or --program
  • Loading branch information
mirkobrombin committed Dec 12, 2024
1 parent 3a5c0a8 commit 5439cf0
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions bottles/frontend/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,13 +686,15 @@ def run_program(self):
_program_gamescope = program.get("gamescope")
_program_virt_desktop = program.get("virtual_desktop")

_executable = _executable.replace("file://", "")
if _executable.startswith('"') and _executable.endswith('"'):
_executable = _executable[1:-1]
elif _executable.startswith("'") and _executable.endswith("'"):
_executable = _executable[1:-1]

WineExecutor.run_program(bottle, program)
if _executable:
_executable = _executable.replace("file://", "")
if _executable.startswith('"') and _executable.endswith('"'):
_executable = _executable[1:-1]
elif _executable.startswith("'") and _executable.endswith("'"):
_executable = _executable[1:-1]
else:
sys.stderr.write("No executable specified or found\n")
exit(1)

# endregion

Expand Down

0 comments on commit 5439cf0

Please sign in to comment.