Permalink
Browse files

remove duplication

  • Loading branch information...
1 parent d03da71 commit 6e17f9f6d8d78e4c98fce45af330ee2418569f27 @despo committed Mar 16, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/capistrano/recipes/deploy/strategy/copy.rb
@@ -121,10 +121,8 @@ def build(directory)
Dir.chdir(directory) do
self.system(configuration[:build_script])
- # Check the return code of last system command and rollback if not 0
- unless $? == 0
- raise Capistrano::Error, "shell command failed with return code #{$?}"
- end
+
+ rollback_changes if last_command_failed?
end
end

0 comments on commit 6e17f9f

Please sign in to comment.