diff options
| author | Max Howell | 2009-07-29 00:57:55 +0100 |
|---|---|---|
| committer | Max Howell | 2009-07-29 01:00:26 +0100 |
| commit | c37b2a079a5b9e42a492451b710ce2a22930430f (patch) | |
| tree | 5a23f24456bc9ca57b6bb081624d316ca3d2943f | |
| parent | fb1db6956f2d8f29c0aa1d25055f1386ad337fa7 (diff) | |
| download | homebrew-c37b2a079a5b9e42a492451b710ce2a22930430f.tar.bz2 | |
Fix Formula.installed?
| -rw-r--r-- | Library/Homebrew/formula.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index c344437e1..5c082e490 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -51,16 +51,15 @@ class AbstractFormula end # end ruby is weird section - def version - @version - end - def name - @name + attr_reader :version, :name + + # reimplement if your package has dependencies + def deps end # if the dir is there, but it's empty we consider it not installed def installed? - return prefix.children.count > 0 + return prefix.children.length > 0 rescue return false end @@ -74,7 +73,6 @@ class AbstractFormula # end ruby is weird section end -public def prefix raise "@name.nil!" if @name.nil? raise "@version.nil?" if @version.nil? |
