Skip to content

Commit

Permalink
Merge pull request #5875 from asottile/patch-1
Browse files Browse the repository at this point in the history
Make sure to quote `sys.executable` as we're running a shell
  • Loading branch information
asottile committed Sep 23, 2019
2 parents c28b631 + 19c9e53 commit 8806b1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion testing/test_parseopt.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import argparse
import distutils.spawn
import os
import shlex
import sys

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

0 comments on commit 8806b1f

Please sign in to comment.