lib/percheron/actions/exec_local.rb in percheron-0.6.4 vs lib/percheron/actions/exec_local.rb in percheron-0.7.0
- old
+ new
@@ -24,18 +24,18 @@
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)))
+ execute_command!('/bin/sh %s 2>&1' % Pathname.new(File.expand_path(script)))
end
end
end
def execute_command!(command)
- $logger.info "Executing #{description} '#{command}' locally"
- Open3.popen2e(command) do |stdin, stdout_stderr, wait_thr|
- while line = stdout_stderr.gets
+ $logger.info "Executing #{description} script '#{command}' locally"
+ Open3.popen2e(command) do |_, stdout_stderr, _|
+ while (line = stdout_stderr.gets)
$logger.debug line.strip
end
end
end