Skip to content

Commit

Permalink
Only try to read piped data if STDIN is not a TTY.
Browse files Browse the repository at this point in the history
  • Loading branch information
alloy committed Aug 24, 2013
1 parent 5ff566f commit 43e813b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Ruby/bin/terminal-notifier
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ end

require 'terminal-notifier'

unless ARGV.include?("-message")
if !ARGV.include?("-message") && !STDIN.tty?
ARGV.push(*["-message", STDIN.read.chomp])
end

Expand Down

0 comments on commit 43e813b

Please sign in to comment.