diff options
| author | Jack Nagel | 2014-10-17 12:01:27 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-10-17 12:01:49 -0500 |
| commit | a2e15e432b66de1f59ab5cf6743975653cd79161 (patch) | |
| tree | 792269c28ea0cbf9b9654062b169829ec1bc8e98 /Library | |
| parent | 2d7d43b5830367d583ff5635753b1f68fcd04843 (diff) | |
| download | homebrew-a2e15e432b66de1f59ab5cf6743975653cd79161.tar.bz2 | |
We don't need a Pathname just to stat the directory
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula_cellar_checks.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Library/Homebrew/formula_cellar_checks.rb b/Library/Homebrew/formula_cellar_checks.rb index da14f38e1..939b55b1c 100644 --- a/Library/Homebrew/formula_cellar_checks.rb +++ b/Library/Homebrew/formula_cellar_checks.rb @@ -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 |
