diff options
| author | Mike McQuaid | 2013-07-17 09:34:43 -0700 |
|---|---|---|
| committer | Mike McQuaid | 2013-07-17 09:36:44 -0700 |
| commit | f526bd5017d6347680180d32d15b73206576ce05 (patch) | |
| tree | 624278a1402e9f502237199c7950c2e706a7efe1 /Library | |
| parent | 16b69317fe926acaa742f520b13340fb4f117e7d (diff) | |
| download | brew-f526bd5017d6347680180d32d15b73206576ce05.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 |
