Homebrew / homebrew-bundle

📦 Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask and the Mac App Store.
MIT License
5.34k stars 287 forks source link

arbitrary ruby? #413

Closed AlJohri closed 5 years ago

AlJohri commented 5 years ago

previously, I used to put the following snippet at the bottom of my Brewfile and it would work just fine:

# requires password or interaction from user
if ENV['BREWFILE_INTERACTIVE']
  mas '1Password', id: 1333542190
  mas 'Pocket', id: 568494494
  mas 'DaisyDisk', id: 411643860
  mas 'Leaf', id: 576338668
  mas 'Todoist', id: 585829637
  mas 'WhatsApp Desktop', id: 1147396723

  cask 'ngrok'
  cask 'virtualbox'
  cask 'teamviewer'
  cask 'private-internet-access'
  cask 'flash-npapi'
  cask '1password-cli'
  cask 'google-hangouts'
  brew 'zzz'
end

for some reason, it doesn't seem to be working anymore. I even tried adding:

puts ENV
puts ENV['BREWFILE_INTERACTIVE']

puts ENV doesn't show a hash of environment variables but instead prints the string, "ENV"

I tried setting the variable in multiple ways but neither worked. Tried both BREWFILE_INTERACTIVE=1 ./script/setup and export BREWFILE_INTERACTIVE=1.

any ideas if this functionality was removed?

MikeMcQuaid commented 5 years ago

Homebrew doesn’t pass through arbritrary environment variables unless they start with ‘HOMEBREW_’