From 901ef31fd176a036d20696898fbbfc15bce4d3fb Mon Sep 17 00:00:00 2001 From: Irina Truong Date: Thu, 7 May 2020 16:41:23 -0700 Subject: Fix bug introduced in #1102. (#1178) --- pgcli/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgcli/main.py b/pgcli/main.py index cc3d58c4..080b2fd2 100644 --- a/pgcli/main.py +++ b/pgcli/main.py @@ -1075,7 +1075,7 @@ class PGCli(object): def echo_via_pager(self, text, color=None): if self.pgspecial.pager_config == PAGER_OFF or self.watch_command: click.echo(text, color=color) - elif "pspg" in os.environ["PAGER"] and self.table_format == "csv": + elif "pspg" in os.environ.get("PAGER", "") and self.table_format == "csv": click.echo_via_pager(text, color) elif self.pgspecial.pager_config == PAGER_LONG_OUTPUT: lines = text.split("\n") -- cgit v1.2.3