summaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
authorRenaud Paquay <rpaquay@google.com>2016-11-01 15:51:59 -0700
committerRenaud Paquay <rpaquay@google.com>2017-08-31 13:49:26 -0700
commite8595e9df7980b0b7d9111de43d294c4439d474c (patch)
tree1a7034b7854eb47965b8112ccaf3b33687cac583 /main.py
parent227ad2ef42f47798d24814dfc2cef8119c313ab7 (diff)
downloadgit-repo-e8595e9df7980b0b7d9111de43d294c4439d474c.tar.gz
Support pager on Windows
Windows does not support pipe|fork, but we can simulate by creating the pager as a child process, redirecting stdout/in/err appropriately and then waiting for the child process to terminate after we are done executing the repo command. Change-Id: I5dd2bdeb4095e4d93bc678802e53c6d4eda0235b
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.py b/main.py
index 386b4f13..a6538c2a 100755
--- a/main.py
+++ b/main.py
@@ -55,7 +55,7 @@ from error import NoSuchProjectError
55from error import RepoChangedException 55from error import RepoChangedException
56import gitc_utils 56import gitc_utils
57from manifest_xml import GitcManifest, XmlManifest 57from manifest_xml import GitcManifest, XmlManifest
58from pager import RunPager 58from pager import RunPager, TerminatePager
59from wrapper import WrapperPath, Wrapper 59from wrapper import WrapperPath, Wrapper
60 60
61from subcmds import all_commands 61from subcmds import all_commands
@@ -542,6 +542,7 @@ def _Main(argv):
542 print('fatal: %s' % e, file=sys.stderr) 542 print('fatal: %s' % e, file=sys.stderr)
543 result = 128 543 result = 128
544 544
545 TerminatePager()
545 sys.exit(result) 546 sys.exit(result)
546 547
547if __name__ == '__main__': 548if __name__ == '__main__':