Fix update manager 500 internal server error issue

This commit is contained in:
Manson Wang 2014-02-18 10:35:19 +08:00
parent 608aabb8c0
commit e84aae7b74
1 changed files with 1 additions and 1 deletions

View File

@ -131,6 +131,7 @@ class Admin::SitesController < OrbitBackendController
%x(git stash) unless need_stash
%x(git fetch origin)
pull_result = %x(git pull -r --ff-only 2>&1 origin #{@branch})
%x(git stash pop) unless need_stash
if pull_result.include? "fatal: Not possible to fast-forward, aborting."
result = "failed"
@ -138,7 +139,6 @@ class Admin::SitesController < OrbitBackendController
result = "success"
Bundler.with_clean_env { `cd #{Rails.root} && bundle install && touch tmp/restart.txt` }
end
%x(git stash pop) unless need_stash
render :text => result
end