Merge pull request #5875 from asottile/patch-1
Make sure to quote `sys.executable` as we're running a shell
This commit is contained in:
commit
8806b1f531
|
@ -1,6 +1,7 @@
|
||||||
import argparse
|
import argparse
|
||||||
import distutils.spawn
|
import distutils.spawn
|
||||||
import os
|
import os
|
||||||
|
import shlex
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import py
|
import py
|
||||||
|
@ -300,7 +301,7 @@ def test_argcomplete(testdir, monkeypatch):
|
||||||
# so we use bash
|
# so we use bash
|
||||||
fp.write(
|
fp.write(
|
||||||
'COMP_WORDBREAKS="$COMP_WORDBREAKS" {} -m pytest 8>&1 9>&2'.format(
|
'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
|
# alternative would be exteneded Testdir.{run(),_run(),popen()} to be able
|
||||||
|
|
Loading…
Reference in New Issue