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: Dirk Pranke <dpranke@google.com>
changes/69/2893669/2
Robert Liao 4 years ago committed by LUCI CQ
parent 542224ebd6
commit b888780d17

@ -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)

Loading…
Cancel
Save