denji / homebrew-nginx

:fire_engine: Community NGINX tap for custom modules
https://denji.github.io/homebrew-nginx/
Other
617 stars 199 forks source link

Fails to find brew when installing with luajit #384

Closed bnomis closed 3 years ago

bnomis commented 3 years ago

version: nginx-1.19.10

This line:

      luajit_path = `brew --prefix luajit`.chomp

Fails with the exception below. If I change brew to /usr/local/bin/brew it works.

Seems related to this change:

  #env :userpaths
Error: An exception occurred within a child process:
  Errno::ENOENT: No such file or directory - brew
/usr/local/Homebrew/Library/Taps/denji/homebrew-nginx/Formula/nginx-full.rb:296:in ``'
/usr/local/Homebrew/Library/Taps/denji/homebrew-nginx/Formula/nginx-full.rb:296:in `install'
/usr/local/Homebrew/Library/Homebrew/debrew.rb:45:in `block in install'
/usr/local/Homebrew/Library/Homebrew/debrew.rb:119:in `debrew'
/usr/local/Homebrew/Library/Homebrew/debrew.rb:45:in `install'
/usr/local/Homebrew/Library/Homebrew/build.rb:177:in `block (2 levels) in install'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1254:in `block in brew'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2327:in `block (2 levels) in stage'
/usr/local/Homebrew/Library/Homebrew/utils.rb:558:in `with_env'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2326:in `block in stage'
/usr/local/Homebrew/Library/Homebrew/resource.rb:121:in `block (2 levels) in unpack'
/usr/local/Homebrew/Library/Homebrew/download_strategy.rb:115:in `chdir'
/usr/local/Homebrew/Library/Homebrew/download_strategy.rb:115:in `chdir'
/usr/local/Homebrew/Library/Homebrew/download_strategy.rb:102:in `stage'
/usr/local/Homebrew/Library/Homebrew/resource.rb:117:in `block in unpack'
/usr/local/Homebrew/Library/Homebrew/mktemp.rb:63:in `block in run'
/usr/local/Homebrew/Library/Homebrew/mktemp.rb:63:in `chdir'
/usr/local/Homebrew/Library/Homebrew/mktemp.rb:63:in `run'
/usr/local/Homebrew/Library/Homebrew/resource.rb:199:in `mktemp'
/usr/local/Homebrew/Library/Homebrew/resource.rb:116:in `unpack'
/usr/local/Homebrew/Library/Homebrew/resource.rb:91:in `stage'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/lib/ruby/2.6.0/forwardable.rb:230:in `stage'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2306:in `stage'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1247:in `brew'
/usr/local/Homebrew/Library/Homebrew/build.rb:138:in `block in install'
/usr/local/Homebrew/Library/Homebrew/utils.rb:558:in `with_env'
/usr/local/Homebrew/Library/Homebrew/build.rb:133:in `install'
/usr/local/Homebrew/Library/Homebrew/build.rb:228:in `<main>'