Skip to content

Commit f3394e7

Browse files
committed
Fix diff printing to stdout if -o isn't specified.
1 parent af7448c commit f3394e7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

planemo/commands/cmd_shed_diff.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ def diff(realized_repository):
102102
# Redirect a copy to user_requested_output if they did:
103103
if user_requested_output is not None:
104104
shutil.copy(diff_output.name, user_requested_output)
105-
105+
else:
106+
with open(diff_output.name, "r") as f:
107+
sys.stdout.write(f.read())
106108
# Rewind to the start of the file and read it in its entirety
107109
diff_output.seek(0)
108110
diff_output_contents = diff_output.read()

0 commit comments

Comments
 (0)