Skip to content

Commit

Permalink
Change term to dumb and use new RVM installer URL
Browse files Browse the repository at this point in the history
  • Loading branch information
xdissent committed Apr 12, 2012
1 parent c27a894 commit 66e7fbb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
default['rvm']['user_installs'] = []

# system-wide installer options
default['rvm']['installer_url'] = "https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer"
default['rvm']['installer_url'] = "https://get.rvm.io"
default['rvm']['branch'] = "stable"
default['rvm']['version'] = "head"
default['rvm']['upgrade'] = "none"
Expand Down
14 changes: 5 additions & 9 deletions libraries/chef_rvm_recipe_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module RVM
module RecipeHelpers
def build_script_flags(version, branch)
script_flags = ""
script_flags += " -s --" if version or branch
script_flags += " --version #{version}" if version
script_flags += " --branch #{branch}" if branch
script_flags
Expand Down Expand Up @@ -59,21 +60,16 @@ def install_rvm(opts = {})
if opts[:user]
user_dir = opts[:rvm_prefix]
exec_name = "install user RVM for #{opts[:user]}"
exec_env = { 'USER' => opts[:user], 'HOME' => user_dir }
exec_env = { 'USER' => opts[:user], 'HOME' => user_dir, 'TERM' => 'dumb' }
else
user_dir = nil
exec_name = "install system-wide RVM"
exec_env = nil
exec_env = { 'TERM' => 'dumb' }
end

i = bash exec_name do
i = execute exec_name do
user opts[:user] || "root"
code <<-EOH
RVM_INSTALL=`mktemp`
curl -s #{opts[:installer_url]} > $RVM_INSTALL
bash $RVM_INSTALL #{opts[:script_flags]}
rm $RVM_INSTALL
EOH
command "curl -L #{opts[:installer_url]} | bash #{opts[:script_flags]}"
environment(exec_env)

# excute in compile phase if gem_package recipe is requested
Expand Down

0 comments on commit 66e7fbb

Please sign in to comment.