diff options
| author | Tim D. Smith | 2016-10-15 23:52:55 -0700 |
|---|---|---|
| committer | Tim D. Smith | 2016-10-15 23:52:55 -0700 |
| commit | 22a64aa6c630ad73c3830cf3bbbf129bfbc4d19c (patch) | |
| tree | c1b3eac6e67e20903fbefeebc35cb39163a949e4 | |
| parent | 371cd0dd3e6d31ef96b2e000a4fa9519938b0aab (diff) | |
| download | brew-22a64aa6c630ad73c3830cf3bbbf129bfbc4d19c.tar.bz2 | |
Explain why info could be nil
| -rw-r--r-- | Library/Homebrew/keg_relocate.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/keg_relocate.rb b/Library/Homebrew/keg_relocate.rb index 3e777d0c1..17911b90b 100644 --- a/Library/Homebrew/keg_relocate.rb +++ b/Library/Homebrew/keg_relocate.rb @@ -89,6 +89,10 @@ class Keg output.force_encoding(Encoding::ASCII_8BIT) output.each_line do |line| path, info = line.split("\0", 2) + # `file` sometimes prints more than one line of output per file; + # subsequent lines do not contain a null-byte separator, so `info` + # will be `nil` for those lines + next unless info next unless info.include?("text") path = Pathname.new(path) next unless files.include?(path) |
