Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frontend: cli: Quote passed args #2361

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 "".__ne__(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