Fix executing of virtualenv pylint on Windows.
6a7e454789
broke executing pylint on Windows,
because there was a pylint Python script in vev\Scripts, and subprocess tried
to execute that instead of the .exe.
This commit is contained in:
parent
f4479a8140
commit
532ec30d00
@ -91,8 +91,12 @@ def run(name, target=None, print_version=False):
|
||||
if target is not None:
|
||||
args.append(target)
|
||||
with _adjusted_pythonpath(name):
|
||||
if os.name == 'nt':
|
||||
exename = name + '.exe'
|
||||
else:
|
||||
exename = name
|
||||
# for virtualenvs
|
||||
executable = os.path.join(os.path.dirname(sys.executable), name)
|
||||
executable = os.path.join(os.path.dirname(sys.executable), exename)
|
||||
if not os.path.exists(executable):
|
||||
# in $PATH
|
||||
executable = name
|
||||
|
Loading…
Reference in New Issue
Block a user