changeset 49650:ac93876ea2df stable

setup: treat error output and non-zero return code differently Choking on Mercurial's stderr mean armless warning can derails the whole install process. We do like to be able to issue warning to people so we stop considering any stderr is a fatal mistake. This allow us to actually boostrap a version of Mercurial without loosing to many sanity point. For example in case where evolve is not loaded, something that happens when the recorded version is malformatted. Creating a wonderful ouroboros.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 30 Jan 2023 18:50:11 +0100
parents 8d390a13474d
children 68cf519429ef 1bd33932713d
files setup.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Mon Jan 30 18:41:59 2023 +0100
+++ b/setup.py	Mon Jan 30 18:50:11 2023 +0100
@@ -221,9 +221,10 @@
         cmd = self.cmd + args
         returncode, out, err = runcmd(cmd, self.env)
         err = filterhgerr(err)
-        if err or returncode != 0:
+        if err:
             print("stderr from '%s':" % (' '.join(cmd)), file=sys.stderr)
             print(err, file=sys.stderr)
+        if returncode != 0:
             return b''
         return out