Skip to content

Commit

Permalink
redirect STDERR since some software prints its version to STDERR inst…
Browse files Browse the repository at this point in the history
…ead of STDOUT - fixes sprinkle-tool#30
  • Loading branch information
joshgoebel committed Sep 18, 2011
1 parent e4fdd28 commit 8825ac4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sprinkle/verifiers/executable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def has_executable(path)
# defaults to "-v").
def has_executable_with_version(path, version, get_version = '-v')
if path.include?('/')
@commands << "[ -x #{path} -a -n \"`#{path} #{get_version} 2> /dev/null | egrep -e \\\"#{version}\\\"`\" ]"
@commands << "[ -x #{path} -a -n \"`#{path} #{get_version} 2>&1 | egrep -e \\\"#{version}\\\"`\" ]"
else
@commands << "[ -n \"`echo \\`which #{path}\\``\" -a -n \"`\\`which #{path}\\` #{get_version} 2>&1 | egrep -e \\\"#{version}\\\"`\" ]"
end
Expand Down

0 comments on commit 8825ac4

Please sign in to comment.