Skip to content

Commit 8806b1f

Browse files
authored
Merge pull request #5875 from asottile/patch-1
Make sure to quote `sys.executable` as we're running a shell
2 parents c28b631 + 19c9e53 commit 8806b1f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

testing/test_parseopt.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import argparse
22
import distutils.spawn
33
import os
4+
import shlex
45
import sys
56

67
import py
@@ -300,7 +301,7 @@ def test_argcomplete(testdir, monkeypatch):
300301
# so we use bash
301302
fp.write(
302303
'COMP_WORDBREAKS="$COMP_WORDBREAKS" {} -m pytest 8>&1 9>&2'.format(
303-
sys.executable
304+
shlex.quote(sys.executable)
304305
)
305306
)
306307
# alternative would be exteneded Testdir.{run(),_run(),popen()} to be able

0 commit comments

Comments
 (0)