Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'find_executable' of https://github.com/markus1189/Ruby-…

…Graphviz into markus1189-find_executable
  • Loading branch information...
commit 8e4c0737b444737e810b709b8a63702e475ce740 2 parents 179c885 + a3adbff
@glejeune authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/graphviz/utils.rb
View
4 lib/graphviz/utils.rb
@@ -26,8 +26,8 @@ def find_executable(bin, custom_paths) #:nodoc:
return file_path if File.executable?(file_path) and File.file?(file_path)
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ # WAS: elsif RUBY_PLATFORM =~ /mswin|mingw/
- found_ext = (ENV['PATHEXT'] || '.exe;.bat;.com').split(";").find {|ext| File.executable?(file + ext) }
- return file + found_ext if found_ext
+ found_ext = (ENV['PATHEXT'] || '.exe;.bat;.com').split(";").find {|ext| File.executable?(file_path + ext) }
+ return file_path + found_ext if found_ext
end
end
return nil
Please sign in to comment.
Something went wrong with that request. Please try again.