diff options
| author | Jack Nagel | 2014-10-17 12:01:27 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-10-17 12:01:49 -0500 |
| commit | f840c592f0e61754a473a9d1faca91555f780496 (patch) | |
| tree | 89a8e5dc675419700c60e06f88711ecc71a961d3 /Library | |
| parent | ecc09cee7e828d154af8543e0461af933ab7ee05 (diff) | |
| download | brew-f840c592f0e61754a473a9d1faca91555f780496.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 |
