mercurial/utils/procutil.py
branchstable
changeset 51168 a9e00554b3e4
parent 50997 def6f1a4604b
--- a/mercurial/utils/procutil.py	Sat Dec 02 15:02:03 2023 -0300
+++ b/mercurial/utils/procutil.py	Sat Dec 02 15:10:28 2023 -0300
@@ -686,8 +686,9 @@
         # we can't use close_fds *and* redirect stdin. I'm not sure that we
         # need to because the detached process has no console connection.
 
+        stdin = None
+
         try:
-            stdin = None
             if stdin_bytes is not None:
                 stdin = pycompat.unnamedtempfile()
                 stdin.write(stdin_bytes)