mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Remove silly path method
This commit is contained in:
parent
8fd2778a95
commit
c7ec737f86
@ -44,7 +44,8 @@ class Formula
|
|||||||
@name=name
|
@name=name
|
||||||
validate_variable :name
|
validate_variable :name
|
||||||
|
|
||||||
@path = path.nil? ? nil : Pathname.new(path)
|
# If we got an explicit path, use that, else determine from the name
|
||||||
|
@path = path.nil? ? self.class.path(name) : Pathname.new(path)
|
||||||
|
|
||||||
set_instance_variable 'version'
|
set_instance_variable 'version'
|
||||||
@version ||= @spec_to_use.detect_version
|
@version ||= @spec_to_use.detect_version
|
||||||
@ -86,14 +87,6 @@ class Formula
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def path
|
|
||||||
if @path.nil?
|
|
||||||
return self.class.path(name)
|
|
||||||
else
|
|
||||||
return @path
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def prefix
|
def prefix
|
||||||
validate_variable :name
|
validate_variable :name
|
||||||
validate_variable :version
|
validate_variable :version
|
||||||
|
Loading…
x
Reference in New Issue
Block a user