Class: Yadisk::CheckRuntime

Inherits:
Object
  • Object
show all
Defined in:
lib/yadisk/check_runtime.rb

Class Method Summary collapse

Class Method Details

.abort!Object



20
21
22
23
# 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_wgetObject



9
10
11
12
13
14
15
16
17
18
# 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