Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Teach deploy:web:enable to fail gracefully #166

Merged
merged 1 commit into from

3 participants

@lmarlow

Don't fail if the maintenance files does not exist. This could happen if
multiple web servers share their #{shared_path}/system folder, the rm
would succeed on the first web box and fail on others in this case.

@lmarlow lmarlow Teach deploy:web:enable to fail gracefully
Don't fail if the maintenance files does not exist. This could happen if
multiple web servers share their #{shared_path}/system folder, the rm
would succeed on the first web box and fail on others in this case.
22a1c8b
@leehambley leehambley merged commit bc839ac into capistrano:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 22, 2012
  1. @lmarlow

    Teach deploy:web:enable to fail gracefully

    lmarlow authored
    Don't fail if the maintenance files does not exist. This could happen if
    multiple web servers share their #{shared_path}/system folder, the rm
    would succeed on the first web box and fail on others in this case.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/capistrano/recipes/deploy.rb
View
4 lib/capistrano/recipes/deploy.rb
@@ -546,7 +546,7 @@ def try_runner(*args)
DESC
task :disable, :roles => :web, :except => { :no_release => true } do
require 'erb'
- on_rollback { run "rm #{shared_path}/system/#{maintenance_basename}.html" }
+ on_rollback { run "rm -f #{shared_path}/system/#{maintenance_basename}.html" }
warn <<-EOHTACCESS
@@ -588,7 +588,7 @@ def try_runner(*args)
web-accessible again.
DESC
task :enable, :roles => :web, :except => { :no_release => true } do
- run "rm #{shared_path}/system/#{maintenance_basename}.html"
+ run "rm -f #{shared_path}/system/#{maintenance_basename}.html"
end
end
end
Something went wrong with that request. Please try again.