diff options
| author | Mike McQuaid | 2013-07-17 09:34:43 -0700 |
|---|---|---|
| committer | Mike McQuaid | 2013-07-17 09:36:44 -0700 |
| commit | 435d54122cc3f2630fcd1c0f49300977ff4f4611 (patch) | |
| tree | 61e5e4ab70786180ecdb291abe533432fa13156f /Library | |
| parent | bb75b646ec809710f846f21128089e3679376a87 (diff) | |
| download | homebrew-435d54122cc3f2630fcd1c0f49300977ff4f4611.tar.bz2 | |
check_PATH: return early if (s)bin doesn't exist.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula_cellar_checks.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Library/Homebrew/formula_cellar_checks.rb b/Library/Homebrew/formula_cellar_checks.rb index 71760b600..8354a89d7 100644 --- a/Library/Homebrew/formula_cellar_checks.rb +++ b/Library/Homebrew/formula_cellar_checks.rb @@ -4,10 +4,13 @@ module FormulaCellarChecks return unless bin.directory? return unless bin.children.length > 0 - bin = (HOMEBREW_PREFIX/bin.basename).realpath - return if ORIGINAL_PATHS.include? bin + prefix_bin = (HOMEBREW_PREFIX/bin.basename) + return unless prefix_bin.directory? - ["#{bin} is not in your PATH", + prefix_bin = prefix_bin.realpath + return if ORIGINAL_PATHS.include? prefix_bin + + ["#{prefix_bin} is not in your PATH", "You can amend this by altering your ~/.bashrc file"] end |
