mirror of
https://github.com/Dev-Wiki/git-repo.git
synced 2025-12-14 00:24:05 +08:00
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
This commit is contained in:
3
main.py
3
main.py
@@ -55,7 +55,7 @@ from error import NoSuchProjectError
|
||||
from error import RepoChangedException
|
||||
import gitc_utils
|
||||
from manifest_xml import GitcManifest, XmlManifest
|
||||
from pager import RunPager
|
||||
from pager import RunPager, TerminatePager
|
||||
from wrapper import WrapperPath, Wrapper
|
||||
|
||||
from subcmds import all_commands
|
||||
@@ -542,6 +542,7 @@ def _Main(argv):
|
||||
print('fatal: %s' % e, file=sys.stderr)
|
||||
result = 128
|
||||
|
||||
TerminatePager()
|
||||
sys.exit(result)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user