1
0
Fork 0

bugfix: don't echo a newline when output is empty.

This commit is contained in:
laixintao 2020-04-18 14:05:34 +08:00
parent 005fd2fcee
commit 94718efc35
No known key found for this signature in database
GPG Key ID: 4E7314AC219D7FE4
1 changed files with 2 additions and 1 deletions

View File

@ -660,7 +660,8 @@ class PGCli(object):
except IOError as e:
click.secho(str(e), err=True, fg="red")
else:
self.echo_via_pager("\n".join(output))
if output:
self.echo_via_pager("\n".join(output))
except KeyboardInterrupt:
pass