use Foreman::Process to extract command running

This commit is contained in:
David Dollar
2012-08-14 17:00:01 -04:00
parent 6042783e82
commit 8921cac35b

View File

@@ -76,7 +76,8 @@ class Foreman::CLI < Thor
def run(*args)
load_environment!
begin
exec engine.env, args.shelljoin
process = Foreman::Process.new(args.shelljoin, :env => engine.env)
process.run
rescue Errno::EACCES
error "not executable: #{args.first}"
rescue Errno::ENOENT