Printing the repo_url when failing. #866

This commit is contained in:
Parker Moore 2012-12-20 00:47:38 -05:00
parent 51fb2bcc5a
commit d089889772

View File

@ -328,7 +328,16 @@ multitask :push do
if system "git push origin #{deploy_branch}" if system "git push origin #{deploy_branch}"
puts "\n## GitHub Pages deploy complete" puts "\n## GitHub Pages deploy complete"
else else
raise "\n## Octopress could not push to your repository. Check your internet connection." remote = `git remote -v`
repo_url = case remote
when /(http[^\s]+)/
$1
when /(git@[^\s]+)/
$1
else
""
end
raise "\n## Octopress could not push to #{repo_url}"
end end
end end
else else