-
Notifications
You must be signed in to change notification settings - Fork 108
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
RbenvGem resource options Hash vs String #117
Comments
In addition, since
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the master branch the :options are defined as either a Hash or a String which is good
https://github.com/RiotGames/rbenv-cookbook/blob/master/resources/gem.rb#L30
But then they are always casted into a String for passing to the
gem install
command:https://github.com/RiotGames/rbenv-cookbook/blob/master/libraries/provider_rbenv_rubygems.rb#L88
This means that if we need to pass an extra environment variable to the shell, there is no way to do so. So instead of being able to run:
I had to replace the
rbenv_gem
block with abash
block:Would it make sense to detect the type of the :options parameter inside :install_via_gem_command and if it's a string, pass it as an argument, and if it's a hash, merge it with the hash you're passing to :shell_out!?
The text was updated successfully, but these errors were encountered: