print outpath only when not writing to a tty

This commit is contained in:
Andrew Cassidy 2024-08-26 21:50:00 -07:00
parent 939b39c3e6
commit a96073cb67

View File

@ -16,6 +16,8 @@
import pathlib
import re
from sys import stdout
import click
import yaclog
@ -111,7 +113,10 @@ def main(path, outpath, name):
fp.write('KERBALCHANGELOG\n')
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__':