Skip to content

Commit 2d82492

Browse files
author
Ruslan Mstoi
authored
tools: bootstrap: add support for symlinks in pwd (envoyproxy#22513)
Currently bootstrap does not support paths with symlinks. For example: ln -s envoy/ envoy-symlink cd envoy-symlink support/bootstrap ERROR: this script must be run at the root of the envoy source tree $ echo $PWD /envoy-symlink $ echo "$(git rev-parse --show-toplevel)" /envoy Solution is to use pwd -P (physical: avoid all symlinks) instead of $PWD $ echo "$(pwd -P)" /envoy Signed-off-by: Ruslan Mstoi <[email protected]>
1 parent 7f741c1 commit 2d82492

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

support/bootstrap

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# TODO(hausdorff): If compatibility becomes an issue here, come back and do this
1010
# "the right way". This is hard to do in general, since `realpath` is not
1111
# standard.
12-
if [ ! "$PWD" == "$(git rev-parse --show-toplevel)" ]; then
12+
if [ ! "$(pwd -P)" == "$(git rev-parse --show-toplevel)" ]; then
1313
cat >&2 <<__EOF__
1414
ERROR: this script must be run at the root of the envoy source tree
1515
__EOF__

0 commit comments

Comments
 (0)