Commit d18f4ec1 authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

Fix tools/node/fetch_deps.py wrt gclient PATH requirements.

Turns out gclient calls download_from_google_storage, which needs to be
included in PATH.

TBR=machenbach@chromium.org

Bug: v8:6105
Change-Id: I15d44d67152f6fa0d20ae7bc7e44bc5e0393b519
Reviewed-on: https://chromium-review.googlesource.com/852616Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50389}
parent 716e539c
......@@ -64,10 +64,13 @@ def FetchDeps(v8_path, depot_tools):
temporary_git = EnsureGit(v8_path)
try:
print "Fetching dependencies."
gclient = os.path.join(depot_tools, "gclient")
env = os.environ.copy()
# gclient needs to have depot_tools in the PATH.
env["PATH"] = depot_tools + os.pathsep + env["PATH"]
spec = "solutions = %s" % GCLIENT_SOLUTION
subprocess.check_call([gclient, "sync", "--spec", spec],
cwd=os.path.join(v8_path, os.path.pardir))
subprocess.check_call(["gclient", "sync", "--spec", spec],
cwd=os.path.join(v8_path, os.path.pardir),
env=env)
except:
raise
finally:
......@@ -86,6 +89,7 @@ def Main(v8_path):
FetchDeps(v8_path, depot_tools)
if __name__ == "__main__":
# Disabled for now.
pass
# Main(sys.argv[1])
if len(sys.argv) > 2 and sys.argv[2] == "force":
Main(sys.argv[1])
else:
print "Disabled for now unless 'force' is passed as second argument."
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