Class: Wox::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/wox/task.rb

Direct Known Subclasses

Builder, Packager, TestFlight

Instance Method Summary collapse

Instance Method Details

#run_command(text, options) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/wox/task.rb', line 3

def run_command text, options
  result = `#{text}`
  
  File.open(options[:results], "w") {|f| f.write result }
  
  if $?.to_i == 0
    puts "Success. Results in #{options[:results]}"
    puts
  else
    fail exec "cat #{options[:results]}"
  end
end