Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Set root_path on rbenv_rehash in rbenv_gem provider.

  • Loading branch information...
commit 14d57a52cd68e8ee6a428447fc60ac9962c95bae 1 parent a3d1de5
Fletcher Nichol fnichol authored
Showing with 10 additions and 8 deletions.
  1. +10 −8 libraries/chef_provider_package_rbenvrubygems.rb
18 libraries/chef_provider_package_rbenvrubygems.rb
View
@@ -64,19 +64,13 @@ def initialize(new_resource, run_context=nil)
def install_package(name, version)
super
- rbenv_rehash new_resource do
- user rbenv_user if rbenv_user
- action :nothing
- end.run_action(:run)
+ rehash
true
end
def remove_package(name, version)
super
- rbenv_rehash new_resource do
- user rbenv_user if rbenv_user
- action :nothing
- end.run_action(:run)
+ rehash
true
end
@@ -87,6 +81,14 @@ def normalize_version
@new_resource.rbenv_version(current_global_version)
end
end
+
+ def rehash
+ rbenv_rehash new_resource do
+ root_path rbenv_root
+ user rbenv_user if rbenv_user
+ action :nothing
+ end.run_action(:run)
+ end
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.