lib/youtube-dl/support.rb
def usable_executable_path_for(exe)
      system_path = which(exe)
      if system_path.nil?
        # TODO: Search vendor bin for executable before just saying it's there.
        vendor_path = File.absolute_path("#{__FILE__}/../../../vendor/bin/#{exe}")
        File.chmod(775, vendor_path) unless File.executable?(vendor_path) # Make sure vendor binary is executable
        vendor_path
      else
        system_path.strip
      end
    end
def usable_executable_path_for(exe)
      system_path = which(exe)
      if system_path.nil?
        # TODO: Search vendor bin for executable before just saying it's there.
        vendor_path = File.absolute_path("#{__FILE__}/../../../vendor/bin/#{exe}")
        File.chmod(775, vendor_path) unless File.executable?(vendor_path) # Make sure vendor binary is executable
        vendor_path
      else
        system_path.strip
      end
    end
Returns a usable youtube-dl executable (system or vendor)

 @param exe [String] Executable to search for
 @return [String] executable path