Permalink
Browse files

Only append \n to URL if outputting to tty. Piping indicates URL only…

… is probably wanted.
  • Loading branch information...
1 parent 94db7fe commit d9668ffacbbb4855e15b63c5232876a011350b2c @headius headius committed Jul 11, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 gist
View
2 gist
@@ -176,7 +176,7 @@ module Gist
url = write(files, private_gist)
browse(url) if browse_enabled
copy(url) if copy
- puts url
+ $stdout.tty? ? puts(url) : print(url)
rescue => e
warn e
puts opts

0 comments on commit d9668ff

Please sign in to comment.