]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Silence system utils tests in emscripten python.sh (#133044)
authorLukas <33507994+Lukasdoe@users.noreply.github.com>
Sun, 27 Apr 2025 22:13:02 +0000 (00:13 +0200)
committerGitHub <noreply@github.com>
Sun, 27 Apr 2025 22:13:02 +0000 (06:13 +0800)
Ensure that checks for system functions don't leak onto stdout on failure.

Tools/wasm/emscripten/__main__.py

index 4a53e0bd1bee1b90659c79ce65f44e12a7b8fc14..849bd5de44eb7b634b2f5a49b729aeaeaa0ea120 100644 (file)
@@ -248,10 +248,10 @@ def configure_emscripten_python(context, working_dir):
 
             # Macs come with FreeBSD coreutils which doesn't have the -s option
             # so feature detect and work around it.
-            if which grealpath > /dev/null; then
+            if which grealpath > /dev/null 2>&1; then
                 # It has brew installed gnu core utils, use that
                 REALPATH="grealpath -s"
-            elif which realpath > /dev/null && realpath --version > /dev/null 2> /dev/null && realpath --version | grep GNU > /dev/null; then
+            elif which realpath > /dev/null 2>&1 && realpath --version > /dev/null 2>&1 && realpath --version | grep GNU > /dev/null 2>&1; then
                 # realpath points to GNU realpath so use it.
                 REALPATH="realpath -s"
             else