Skip to content

Commit 0b469eb

Browse files
committed
Pass Popen argument correctly
1 parent b5df5fe commit 0b469eb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

windows-release/merge-and-upload.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ class RunError(Exception):
6565
pass
6666

6767

68-
def _run(*args):
68+
def _run(*args, single_cmd=False):
69+
if single_cmd:
70+
args = args[0]
6971
with subprocess.Popen(
7072
args,
7173
stdout=subprocess.PIPE,
@@ -230,7 +232,8 @@ def sign_json(cat_file, *files):
230232
_run(MAKECAT, "-v", cdf)
231233
if not cat.is_file():
232234
raise FileNotFoundError(cat)
233-
_run(SIGN_COMMAND, cat)
235+
# Pass as a single arg because the command variable has its own arguments
236+
_run(f'{SIGN_COMMAND} "{cat}"', single_cmd=True)
234237
cdf.unlink()
235238

236239

0 commit comments

Comments
 (0)