CLI: Interactive shell only when stdin is a TTY
This commit is contained in:
parent
ba1464d7f8
commit
dea3395b1e
1 changed files with 3 additions and 2 deletions
5
bin/gpo
5
bin/gpo
|
@ -471,7 +471,8 @@ if __name__ == '__main__':
|
|||
args = sys.argv[1:]
|
||||
if args:
|
||||
cli._parse(args) or sys.stderr.write(stylize(__doc__))
|
||||
else:
|
||||
elif sys.stdout.isatty():
|
||||
cli._shell()
|
||||
|
||||
else:
|
||||
sys.stdout.write(__doc__)
|
||||
|
||||
|
|
Loading…
Reference in a new issue