From 8921cac35b310f1344872ccd0016a7f217df3258 Mon Sep 17 00:00:00 2001 From: David Dollar Date: Tue, 14 Aug 2012 17:00:01 -0400 Subject: [PATCH] use Foreman::Process to extract command running --- lib/foreman/cli.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/foreman/cli.rb b/lib/foreman/cli.rb index 31544ad..4566223 100644 --- a/lib/foreman/cli.rb +++ b/lib/foreman/cli.rb @@ -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