We don't need a Pathname just to stat the directory
This commit is contained in:
parent
ecc09cee7e
commit
f840c592f0
@ -150,7 +150,6 @@ module FormulaCellarChecks
|
||||
private
|
||||
|
||||
def relative_glob(dir, pattern)
|
||||
return [] unless Pathname.new(dir).directory?
|
||||
Dir.chdir(dir) { Dir[pattern] }
|
||||
File.directory?(dir) ? Dir.chdir(dir) { Dir[pattern] } : []
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user