Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the location where the ruby is missing #74

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# [master][]

* Your contribution here!
* [#74](https://github.com/capistrano/rbenv/pull/74): Clarify the location where the ruby is missing - [@creitve](https://github.com/creitve)

# [2.1.1][] (14 Apr 2017)

Expand Down
4 changes: 2 additions & 2 deletions lib/capistrano/tasks/rbenv.rake
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
namespace :rbenv do
task :validate do
on release_roles(fetch(:rbenv_roles)) do
on release_roles(fetch(:rbenv_roles)) do |host|
rbenv_ruby = fetch(:rbenv_ruby)
if rbenv_ruby.nil?
info 'rbenv: rbenv_ruby is not set; ruby version will be defined by the remote hosts via rbenv'
end

# don't check the rbenv_ruby_dir if :rbenv_ruby is not set (it will always fail)
unless rbenv_ruby.nil? || (test "[ -d #{fetch(:rbenv_ruby_dir)} ]")
warn "rbenv: #{rbenv_ruby} is not installed or not found in #{fetch(:rbenv_ruby_dir)}"
warn "rbenv: #{rbenv_ruby} is not installed or not found in #{fetch(:rbenv_ruby_dir)} on #{host}"
exit 1
end
end
Expand Down