main: fix pager logic after negation cleanup
The pager setting is tristate (where None means "auto"),
so make sure we still handle that setting.
Change-Id: I89fe352572dd15922c61e3bb65ac33f847d01ee0
Test: `repo help upload` triggers the pager
Test: `repo -p help upload` triggers the pager
Test: `repo --no-pager help upload` doesn't trigger the pager
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255852
Tested-by: Mike Frysinger <vapier@google.com>
Reviewed-by: David Pursehouse <dpursehouse@collab.net>
diff --git a/main.py b/main.py
index 9846d24..2422e8b 100755
--- a/main.py
+++ b/main.py
@@ -222,7 +222,7 @@
file=sys.stderr)
return 1
- if gopts.pager and not isinstance(cmd, InteractiveCommand):
+ if gopts.pager is not False and not isinstance(cmd, InteractiveCommand):
config = cmd.manifest.globalConfig
if gopts.pager:
use_pager = True