Skip to content

Commit

Permalink
Add message on failed installation of deps. (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yamashita Yuu committed Jul 12, 2013
1 parent 8bf8029 commit 5d24339
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/capistrano-rbenv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,13 @@ def _update_config(script_file, file)
end
}
task(:dependencies, :except => { :no_release => true }) {
platform.packages.install(rbenv_ruby_dependencies)
begin
platform.packages.install(rbenv_ruby_dependencies)
rescue
missing_dependencies = rbenv_ruby_dependencies.reject { |dep| platform.packages.installed?(dep) rescue false }
abort("Failed to install rbenv dependencies: #{missing_dependencies.join(", ")}\n\n" +
"Please install missing packages from outside of Capistrano, or allow #{user} to invoke commands via sudo(8).")
end
}

_cset(:rbenv_ruby_versions) { rbenv.versions }
Expand Down

0 comments on commit 5d24339

Please sign in to comment.