Permalink
Browse files

Fix diff printing to stdout if -o isn't specified.

  • Loading branch information...
jmchilton committed Nov 18, 2015
1 parent af7448c commit f3394e70cee615efd9b81f3c0ca680d7bd99c07d
Showing with 3 additions and 1 deletion.
  1. +3 −1 planemo/commands/cmd_shed_diff.py
@@ -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()

0 comments on commit f3394e7

Please sign in to comment.