Resolve symlinks to cipd, vpython3

If we point a symlink at vpython3 (or various other tools), it will try
to resolve the depot_tools path to wherever that symlink is stored. We
should instead follow the symlink before determining the path.

Prior art:

* in python, we're doing Path.resolve() in many cases
* in shell, there's a "$(readlink "$(dirname "$0"))" (man/push_to_gs.sh)

BUG=b:270994985
TEST=symlink to vpython3 works

Change-Id: Ifee014d2571ccf58d830a2702c8a0ea225dd4821
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4295094
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Brian Norris <briannorris@chromium.org>
This commit is contained in:
Brian Norris
2023-03-03 23:59:36 +00:00
committed by LUCI CQ
parent e0e08ac733
commit c962e86f7b
2 changed files with 2 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ then
fi
base_dir=$(dirname "$0")
base_dir=$(dirname "$(realpath "$0")")
source "$base_dir/cipd_bin_setup.sh"
cipd_bin_setup &> /dev/null