diff options
author | Irina Truong <i.chernyavska@gmail.com> | 2020-05-07 16:41:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-07 16:41:23 -0700 |
commit | 901ef31fd176a036d20696898fbbfc15bce4d3fb (patch) | |
tree | d8124c67f12abaf72ff75fb9ab5f95c12c009209 | |
parent | bcb0c8bce776a5eba9f5425c57c2ec8385f10e94 (diff) |
Fix bug introduced in #1102. (#1178)
-rw-r--r-- | pgcli/main.py | 2 |
1 files changed, 1 insertions, 1 deletions
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") |