Commit b9646629 authored by Edward Lemur's avatar Edward Lemur Committed by Commit Bot

presubmit_support: Set python_executable to vpython.

PRESUBMIT.py scripts might execute commands directly instead of using
CallCommand, so that the conversion to vpython is bypassed, resulting in
errors.

See e.g.
https://cs.chromium.org/chromium/src/third_party/blink/web_tests/PRESUBMIT.py?l=79

Bug: 1017410
Change-Id: If1943fe46cd2fc1e37b89aee14865429f884332b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1879493Reviewed-by: 's avatarAnthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
parent 48614441
......@@ -558,11 +558,10 @@ class InputApi(object):
self.is_windows = sys.platform == 'win32'
# Set python_executable to 'python'. This is interpreted in CallCommand to
# convert to vpython in order to allow scripts in other repos (e.g. src.git)
# to automatically pick up that repo's .vpython file, instead of inheriting
# the one in depot_tools.
self.python_executable = 'python'
# Set python_executable to 'vpython' in order to allow scripts in other
# repos (e.g. src.git) to automatically pick up that repo's .vpython file,
# instead of inheriting the one in depot_tools.
self.python_executable = 'vpython'
self.environ = os.environ
# InputApi.platform is the platform you're currently running on.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment