brew-pkg
brew-pkg copied to clipboard
Fix ARGV.next method not found
Fixes the following issue:
$ brew pkg --with-deps --scripts scripts filebeat
[...]
Error: undefined method `next' for ["--with-deps", "--scripts", "scripts", "filebeat"]:Array
/usr/local/bin/brew-pkg.rb:106:in `pkg'
/usr/local/bin/brew-pkg.rb:162:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/local/Homebrew/Library/Homebrew/utils.rb:86:in `require?'
/usr/local/Homebrew/Library/Homebrew/brew.rb:121:in `<main>'
I'm not a Ruby dev, so maybe there is a better way to do it.