Browse files

Fix another bug with ensure_rbenv_ruby

Backticks are evaluated with sh and may not have the rbenv bin path
loaded. So, check `which ruby` by using a bash login shell.
  • Loading branch information...
1 parent b9d4ddd commit ce1118f52b99e4b585dcb39ca1913eed8a969412 @cespare cespare committed Aug 8, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/terraform/dsl.rb
@@ -133,7 +133,7 @@ def ensure_rbenv_ruby(ruby_version)
ensure_packages "curl", "build-essential", "libxslt1-dev", "libxml2-dev", "libssl-dev"
dep "rbenv ruby: #{ruby_version}" do
- met? { `which ruby`.include?("rbenv") && `rbenv versions`.include?(ruby_version) }
+ met? { `bash -lc 'which ruby'`.include?("rbenv") && `rbenv versions`.include?(ruby_version) }
meet do
puts "Compiling Ruby will take a few minutes."
shell "rbenv install #{ruby_version}"

0 comments on commit ce1118f

Please sign in to comment.