From b4b22453f39f12792329b2e8b95ea91f91dd7191 Mon Sep 17 00:00:00 2001 From: Josip Sokcevic Date: Sat, 4 Mar 2023 16:00:09 +0000 Subject: [PATCH] Revert "Resolve symlinks to cipd, vpython3" This reverts commit c962e86f7bafddfc582922dec44cf7a843228abb. Reason for revert: broke MacOS: realpath: command not found Original change's description: > 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 > Commit-Queue: Brian Norris Bug: b:270994985 Change-Id: I69342f3a52153b8cb1ed4366ede5883dfe5ec0b9 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4310530 Bot-Commit: Rubber Stamper Auto-Submit: Josip Sokcevic Commit-Queue: Rubber Stamper --- cipd | 2 +- vpython3 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cipd b/cipd index 88ea0b9f3..dc305f8aa 100755 --- a/cipd +++ b/cipd @@ -6,7 +6,7 @@ set -e -o pipefail -MYPATH=$(dirname "$(realpath "${BASH_SOURCE[0]}")") +MYPATH=$(dirname "${BASH_SOURCE[0]}") CYGWIN=false # Make sure this starts empty diff --git a/vpython3 b/vpython3 index acbc8a240..bcc63f935 100755 --- a/vpython3 +++ b/vpython3 @@ -34,7 +34,7 @@ then fi -base_dir=$(dirname "$(realpath "$0")") +base_dir=$(dirname "$0") source "$base_dir/cipd_bin_setup.sh" cipd_bin_setup &> /dev/null