changeset 48184:8fae2cc6ee86

dispatch: don't change error status if flushing stdio fails If we already have a non-zero exit code, I don't think we should change it to 255 because we fail to flush stdio. This may not matter yet, but it will matter when I make a killed pager result in exit code 250 (it's currently 255). Differential Revision: https://phab.mercurial-scm.org/D11626
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 08 Oct 2021 13:34:33 -0700
parents eb8092f9304f
children 2f2107c01dee
files mercurial/dispatch.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dispatch.py	Mon Oct 11 17:31:27 2021 +0200
+++ b/mercurial/dispatch.py	Fri Oct 08 13:34:33 2021 -0700
@@ -253,7 +253,7 @@
         status = -1
 
     ret = _flushstdio(req.ui, err)
-    if ret:
+    if ret and not status:
         status = ret
     return status