class Yadisk::CheckRuntime

Public Class Methods

abort!() click to toggle source
# File lib/yadisk/check_runtime.rb, line 20
def self.abort!
  puts "Please install wget or add it to 'PATH' and try again\n"
  abort
end
check_wget() click to toggle source
# File lib/yadisk/check_runtime.rb, line 9
def self.check_wget
  if Yadisk::OS.windows?
    output = IO.popen("where wget").read
    abort! unless $?.to_i == 0
    return
  end

  output = IO.popen("which wget").read
  abort! if output.empty?
end