lib/percheron/actions/exec_local.rb in percheron-0.6.3 vs lib/percheron/actions/exec_local.rb in percheron-0.6.4
- old
+ new
@@ -11,18 +11,20 @@
@scripts = scripts
@description = description
end
def execute!
- $logger.debug "Executing #{description} scripts '#{scripts.inspect}' locally"
- execute_scripts!
+ results = []
+ results << execute_scripts!
+ results.compact.empty? ? nil : container
end
private
attr_reader :container, :scripts, :description
def execute_scripts!
+ $logger.debug "Executing #{description} scripts '#{scripts.inspect}' locally"
scripts.each do |script|
in_working_directory(base_dir) do
execute_command!('/bin/bash -x %s 2>&1' % Pathname.new(File.expand_path(script)))
end
end