Permalink
Browse files

using exec instead of system actually throws errors on fail instead o…

…f simply returning false
  • Loading branch information...
1 parent 71bb4ec commit bbfe10a87abb70060e7af5d1494f5ee54dd4c37e @thedatachef thedatachef committed Aug 22, 2010
Showing with 5 additions and 5 deletions.
  1. +1 −1 TODO.txt
  2. +1 −1 bin/pigsy.rb
  3. +1 −1 lib/swineherd/pig_script.rb
  4. +1 −1 lib/swineherd/pig_task.rb
  5. +1 −1 lib/swineherd/wukong_task.rb
View
@@ -1 +1 @@
-- A PigScript instance needs to raise an error when it fails
+- PigTask should be able to run in local mode
View
@@ -108,7 +108,7 @@
def run_with_args command, *args
args = args.flatten.compact
Log.info [command, *args].join(' ')
- system(command, *args)
+ exec(command, *args)
end
#
@@ -61,7 +61,7 @@ def check_outputs outputs
#
def execute
dest.read
- system('pigsy.rb', run_options, dest.path)
+ exec('pigsy.rb', run_options, dest.path)
end
protected
@@ -18,7 +18,7 @@ def self.new_pig_task job_name, script
}
}
yield options
- system('pigsy.rb', *[pig_args(options), script].flatten) if check_outputs(options[:outputs])
+ exec('pigsy.rb', *[pig_args(options), script].flatten) if check_outputs(options[:outputs])
end
end
@@ -12,7 +12,7 @@ def self.new_wukong_task job_name, script
}
}
yield options
- system(
+ exec(
ruby_interpreter_path,
script, '--run',
wukong_options(options[:extra_wukong_args]),

0 comments on commit bbfe10a

Please sign in to comment.