Skip to content

Commit

Permalink
frontend: cli: run_porgram: Quote passed args
Browse files Browse the repository at this point in the history
Will allow pass symbols like &
  • Loading branch information
psydvl committed Dec 13, 2022
1 parent 31f8a68 commit 0fdd4ce
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions bottles/frontend/cli/cli.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import sys
import uuid
import json
import signal
import shlex
import argparse
import warnings

Expand Down Expand Up @@ -538,7 +539,7 @@ class CLI:
_bottle = self.args.bottle
_program = self.args.program
_keep = self.args.keep_args
_args = " ".join(self.args.args)
_args = self.args.args
_executable = self.args.executable
_cwd = None
_script = None
Expand Down Expand Up @@ -570,7 +571,9 @@ class CLI:
program = [p for p in programs if p["name"] == _program][0]
_executable = program.get("path", "")
if _keep:
_args = program.get("arguments", "") + " " + _args
default_args = program.get("arguments", "")
if "".__eq__(default_args):
_args.insert(0, default_args)
_cwd = program.get("folder", "")
_script = program.get("script", None)

Expand All @@ -587,10 +590,12 @@ class CLI:
if program.get("virtual_desktop") != _virt_desktop:
_virt_desktop = program.get("virtual_desktop")

_args_string = shlex.join(_args)

WineExecutor(
bottle,
exec_path=_executable,
args=_args,
args=_args_string,
cwd=_cwd,
post_script=_script,
override_dxvk=_dxvk,
Expand Down

0 comments on commit 0fdd4ce

Please sign in to comment.