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
|
private
|
||||||
|
|
||||||
def relative_glob(dir, pattern)
|
def relative_glob(dir, pattern)
|
||||||
return [] unless Pathname.new(dir).directory?
|
File.directory?(dir) ? Dir.chdir(dir) { Dir[pattern] } : []
|
||||||
Dir.chdir(dir) { Dir[pattern] }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user