brew audit throwing undefined method 'path' error #2531
-
Github is throwing HTTP400 errors when I try to submit an issue to https://github.com/Homebrew/brew/issues I am following the steps set out by https://docs.brew.sh/Python-for-Formula-Authors $> pip3 install homebrew-pypi-poet
$> poet -f pytest > pytest.rb
$> brew audit --strict pytest.rb
Error: Failed to load cask: pytest.rb
Cask 'pytest' is unreadable: wrong constant name #<Class:0x00007ff7b29c5520>
Warning: Treating pytest.rb as a formula.
Error: undefined method `path' for nil:NilClass
Did you mean? paths
Please report this issue:
https://docs.brew.sh/Troubleshooting
/usr/local/Homebrew/Library/Homebrew/formula_auditor.rb:124:in `audit_synced_versions_formulae'
/usr/local/Homebrew/Library/Homebrew/formula_auditor.rb:823:in `block in audit'
/usr/local/Homebrew/Library/Homebrew/formula_auditor.rb:818:in `each'
/usr/local/Homebrew/Library/Homebrew/formula_auditor.rb:818:in `audit'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/audit.rb:185:in `block in audit'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/audit.rb:169:in `map'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/audit.rb:169:in `audit Same issue happens for Expected output: $> pip3 install homebrew-pypi-poet
$> poet -f pytest > pytest.rb
$> brew audit --strict pytest.rb
* 1: col 1: No Sorbet sigil found in file. Try a `typed: false` to start (you can also use `rubocop -a` to automatically add this).
* 1: col 1: Missing top-level documentation comment for `class Pytest`.
* 1: col 1: Missing frozen string literal comment. current version of poet fails lint checks $> brew config
HOMEBREW_VERSION: 3.3.5-28-g3ab140e
ORIGIN: https://github.com/Homebrew/brew
HEAD: 3ab140e39753536b7e6f8ce337f6f000e31cbb2f
Last commit: 9 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 275a26f6ff36d452f60295b091f2bea4756e44c8
Core tap last commit: 14 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_CORE_GIT_REMOTE: https://github.com/Homebrew/homebrew-core
HOMEBREW_MAKE_JOBS: 16
Homebrew Ruby: 2.6.8 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8/bin/ruby
CPU: 16-core 64-bit kabylake
Clang: 13.0.0 build 1300
Git: 2.30.1 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 11.6-x86_64
CLT: 13.0.0.0.1.1630607135
Xcode: 13.1 $> brew doctor
Your system is ready to brew. Reproduction steps: brew update
brew ls python3 || brew install python
python3 -m pip install homebrew-pypi-poet
poet -f pytest > pytest.rb
brew audit --strict pytest.rb |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Incidentally, your expected output is actually not expected at all. Those errors should never show up for formulae. |
Beta Was this translation helpful? Give feedback.
brew audit
doesn't work on arbitrary formula files. It needs to be installed in a tap to work. For example:Incidentally, your expected output is actually not expected at all. Those errors should never show up for formulae.