mirror of
https://github.com/drewcassidy/yaclog-ksp.git
synced 2024-09-01 14:58:44 +00:00
print outpath only when not writing to a tty
This commit is contained in:
parent
939b39c3e6
commit
a96073cb67
@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
import pathlib
|
import pathlib
|
||||||
import re
|
import re
|
||||||
|
from sys import stdout
|
||||||
|
|
||||||
import click
|
import click
|
||||||
import yaclog
|
import yaclog
|
||||||
|
|
||||||
@ -111,7 +113,10 @@ def main(path, outpath, name):
|
|||||||
fp.write('KERBALCHANGELOG\n')
|
fp.write('KERBALCHANGELOG\n')
|
||||||
fp.write(str(node))
|
fp.write(str(node))
|
||||||
|
|
||||||
print(f'wrote output to {outpath}')
|
if stdout.isatty():
|
||||||
|
print(f'wrote output to {outpath}')
|
||||||
|
else:
|
||||||
|
print(outpath)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user