Skip to content

Instantly share code, notes, and snippets.

@joeybeninghove
Created March 6, 2010 02:44
Show Gist options
  • Save joeybeninghove/323456 to your computer and use it in GitHub Desktop.
Save joeybeninghove/323456 to your computer and use it in GitHub Desktop.
#lame attempt at finding svn.exe
svn_dirs = ENV['PATH'].split(';').select do |path|
Dir.new(path).entries.include? 'svn.exe' if File.directory? path
end
raise StandardError.new 'svn.exe was not found in your path' if svn_dirs.empty?
@svn = Pathname.new svn_dirs.first + '/svn.exe'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment