Skip to content

Commit

Permalink
Fix diff printing to stdout if -o isn't specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Nov 18, 2015
1 parent af7448c commit f3394e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion planemo/commands/cmd_shed_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ def diff(realized_repository):
# Redirect a copy to user_requested_output if they did:
if user_requested_output is not None:
shutil.copy(diff_output.name, user_requested_output)

else:
with open(diff_output.name, "r") as f:
sys.stdout.write(f.read())
# Rewind to the start of the file and read it in its entirety
diff_output.seek(0)
diff_output_contents = diff_output.read()
Expand Down

0 comments on commit f3394e7

Please sign in to comment.