Skip to content

Commit

Permalink
fix[close #3599]: CLI no longer works when starting a Bottle
Browse files Browse the repository at this point in the history
Fix starting an --executable from the CLI.
  • Loading branch information
jntesteves authored and mirkobrombin committed Dec 16, 2024
1 parent 7063d28 commit 53dc73e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions bottles/frontend/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,18 +686,24 @@ def run_program(self):
_program_gamescope = program.get("gamescope")
_program_virt_desktop = program.get("virtual_desktop")

if _executable:
WineExecutor.run_program(bottle, program | {"arguments": _args})

elif _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]

WineExecutor(
bottle,
exec_path=_executable,
args=_args,
).run_cli()
else:
sys.stderr.write("No executable specified or found\n")
sys.stderr.write("No program or executable specified, you must use either --program or --executable\n")
exit(1)

WineExecutor.run_program(bottle, program)

# endregion

# region SHELL
Expand Down

0 comments on commit 53dc73e

Please sign in to comment.