Skip to content
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

Homebrew Environmental Var #87

Closed
bdwyertech opened this issue Jan 18, 2016 · 1 comment · Fixed by Nordstrom/chefdk_bootstrap#84
Closed

Homebrew Environmental Var #87

bdwyertech opened this issue Jan 18, 2016 · 1 comment · Fixed by Nordstrom/chefdk_bootstrap#84

Comments

@bdwyertech
Copy link
Contributor

Looks like this commit got merged in and is now causing issues with the homebrew_package library.

The brew bash script now populates environmental variables which the config library is dependent upon.

Homebrew/legacy-homebrew@390e327

Recipe: homebrew::install_formulas
  * homebrew_package[homebrew/php/composer] action install

    ================================================================================
    Error executing action `install` on resource 'homebrew_package[homebrew/php/composer]'
    ================================================================================

    TypeError
    ---------
    no implicit conversion of nil into String

    Cookbook Trace:
    ---------------
    /var/chef/cache/cookbooks/homebrew/libraries/homebrew_package.rb:94:in `version_from_formula'
    /var/chef/cache/cookbooks/homebrew/libraries/homebrew_package.rb:74:in `current_installed_version'
    /var/chef/cache/cookbooks/homebrew/libraries/homebrew_package.rb:44:in `load_current_resource'

Something like the following needs to be added to the homebrew_package library

  ENV['HOMEBREW_PREFIX'] = brew_cmd.stdout.chomp
  ENV['HOMEBREW_REPOSITORY'] = ENV['HOMEBREW_PREFIX']
  ENV['HOMEBREW_LIBRARY'] = ::File.join(ENV['HOMEBREW_REPOSITORY'], 'Library')
  ENV['HOMEBREW_CELLAR'] = ::File.join(ENV['HOMEBREW_PREFIX'], 'Cellar')
kejadlen added a commit to seattle-beach/sprout-homebrew that referenced this issue Jan 18, 2016
@keen99
Copy link

keen99 commented Jan 19, 2016

thanks for tracking this down - this broke my world this morning as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants