summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHood Chatham <roberthoodchatham@gmail.com>2024-12-09 02:03:11 (GMT)
committerGitHub <noreply@github.com>2024-12-09 02:03:11 (GMT)
commitd8d12b37b5e5acb354db84b07dab8de64a6b9475 (patch)
treed36197df32256eeea0f35fdcf559d27078b01677
parent5876063d06ec55b10793f34bfe516c10f608665c (diff)
downloadcpython-d8d12b37b5e5acb354db84b07dab8de64a6b9475.zip
cpython-d8d12b37b5e5acb354db84b07dab8de64a6b9475.tar.gz
cpython-d8d12b37b5e5acb354db84b07dab8de64a6b9475.tar.bz2
gh-127503: Fix realpath handling in emscripten cli (#127632)
Corrects the handling of realpath on Linux.
-rw-r--r--Tools/wasm/emscripten/__main__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/wasm/emscripten/__main__.py b/Tools/wasm/emscripten/__main__.py
index c998ed7..6843b6f 100644
--- a/Tools/wasm/emscripten/__main__.py
+++ b/Tools/wasm/emscripten/__main__.py
@@ -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