gh-127503: Fix realpath handling in emscripten cli (#127632)

Corrects the handling of realpath on Linux.
This commit is contained in:
Hood Chatham 2024-12-09 03:03:11 +01:00 committed by GitHub
parent 5876063d06
commit d8d12b37b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -223,7 +223,7 @@ def configure_emscripten_python(context, working_dir):
if which grealpath > /dev/null; then
# It has brew installed gnu core utils, use that
REALPATH="grealpath -s"
elif which realpath > /dev/null && realpath --version 2&>1 | grep GNU > /dev/null; then
elif which realpath > /dev/null && realpath --version > /dev/null 2> /dev/null && realpath --version | grep GNU > /dev/null; then
# realpath points to GNU realpath so use it.
REALPATH="realpath -s"
else