Method: Front::CLI::Vagrant#run

Defined in:
lib/front/cli/vagrant.rb

#run(cmd) ⇒ Object



61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/front/cli/vagrant.rb', line 61

def run(cmd)
  cmd = "vagrant #{cmd}"
  options = {}
  options[:chdir] = path

  if wait
    pid = Kernel.spawn(cmd, options)
    Process.wait pid
  else
    cmd = "#{cmd} &>> #{get_log_file()} "
    script.enqueue "cd #{path} && #{cmd}"
  end
end