RiotGamesCookbooks / rbenv-cookbook

Installs and configures rbenv
http://community.opscode.com/cookbooks/rbenv
Apache License 2.0
137 stars 109 forks source link

Failed install requires manual cleanup, as rbenv does not detect if it's sucessfully installed. #132

Open ronabop opened 8 years ago

ronabop commented 8 years ago

https://github.com/ronabop/rbenv-cookbook/blob/master/libraries/chef_mixin_rbenv.rb

lines 59-61:

      def rbenv_installed?
        out = shell_out("ls #{rbenv_bin_path}/rbenv")
        out.exitstatus == 0
      end

Problem: If the URL provided for the install is not available (for example, flaky internet, behind a corporate firewall), the first invocation of this cookbook creates an rbenv directory, and then fails to :sync. Subsequent invocations of the cookbook see that extant directory, and assume that rbenv has been installed, without needing to :sync, and fail.

PR https://github.com/RiotGamesCookbooks/rbenv-cookbook/pull/131 created.