From f28a0c7be897b0e7778ef7c2a051c65b40e801da Mon Sep 17 00:00:00 2001 From: Daniel Angel-Bradford Date: Thu, 24 Apr 2014 15:51:18 +1000 Subject: [PATCH] Ensuring executable command is not only executable as per Ruby's File class but also an actual file (and not a directory) --- lib/tasks/bower.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/bower.rake b/lib/tasks/bower.rake index 8b9cc1b..0b83561 100644 --- a/lib/tasks/bower.rake +++ b/lib/tasks/bower.rake @@ -229,7 +229,7 @@ def find_command(cmd, paths = []) paths.each do |path| exts.each do |ext| exe = File.join(path, "#{cmd}#{ext}") - return exe if File.executable? exe + return exe if (File.executable?(exe) && File.file?(exe)) end end nil