Commit b888780d authored by Robert Liao's avatar Robert Liao Committed by LUCI CQ

Change FindGclientRoot to Use os.path.abspath instead of os.path.realpath

os.path.realpath will resolve back to the subst paths, leading to
inappropriate current working directories for all downstream hooks.

BUG=1208688

Change-Id: Idfcb0fe4d25ab1317db5aae34663b1017d4c4937
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2893669
Commit-Queue: Dirk Pranke <dpranke@google.com>
Auto-Submit: Robert Liao <robliao@chromium.org>
Reviewed-by: 's avatarDirk Pranke <dpranke@google.com>
parent 542224eb
......@@ -19,7 +19,7 @@ import sys
def FindGclientRoot(from_dir, filename='.gclient'):
"""Tries to find the gclient root."""
real_from_dir = os.path.realpath(from_dir)
real_from_dir = os.path.abspath(from_dir)
path = real_from_dir
while not os.path.exists(os.path.join(path, filename)):
split_path = os.path.split(path)
......
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