in lib/build.rb [29:57]
def run
@run_file = Tempfile.new("executor")
@run_file.chmod(0700)
@commands.unshift(checkout_cmd)
if repo_exists? && @allow_git_fetch
@commands.unshift(fetch_cmd)
else
FileUtils.rm_rf(project_dir)
FileUtils.mkdir_p(project_dir)
@commands.unshift(clone_cmd)
end
@run_file.puts %|
@run_file.puts %|set -e|
@run_file.puts %|trap 'kill -s INT 0' EXIT|
@commands.each do |command|
command.strip!
@run_file.puts %|echo
@run_file.puts(command)
end
@run_file.close
@run_at = Time.now
Bundler.with_clean_env { execute("setsid #{@run_file.path}") }
end