Use pwd instead of realpath for macos
Closes https://github.com/protocolbuffers/protobuf/issues/10567
PiperOrigin-RevId: 512750155
diff --git a/php/generate_descriptor_protos.sh b/php/generate_descriptor_protos.sh
index a9af40c..56d95d8 100755
--- a/php/generate_descriptor_protos.sh
+++ b/php/generate_descriptor_protos.sh
@@ -6,11 +6,11 @@
set -e
if [[ -z "${PROTOC}" ]]; then
- PROTOC=$(realpath protoc)
+ PROTOC=$(pwd)/protoc
fi
if [ ! -f $PROTOC ]; then
${BAZEL:-bazel} $BAZEL_STARTUP_FLAGS build -c opt //:protoc $BAZEL_FLAGS
- PROTOC=$(realpath bazel-bin/protoc)
+ PROTOC=$(pwd)/bazel-bin/protoc
fi
if test ! -e src/google/protobuf/stubs/common.h; then