Remove unnecessary usage of Formula.canonical_name
This commit is contained in:
parent
9b24903875
commit
2616127a28
@ -123,7 +123,7 @@ module ServicesCli
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Access current service
|
# Access current service
|
||||||
def service; @service ||= Service.new(Formula.factory(Formula.canonical_name(@formula))) if @formula end
|
def service; @service ||= Service.new(Formula.factory(@formula)) if @formula end
|
||||||
|
|
||||||
# Print usage and `exit(...)` with supplied exit code, if code
|
# Print usage and `exit(...)` with supplied exit code, if code
|
||||||
# is set to `false`, then exit is ignored.
|
# is set to `false`, then exit is ignored.
|
||||||
@ -302,7 +302,7 @@ class Service
|
|||||||
# Create a new `Service` instance from either a path or label.
|
# Create a new `Service` instance from either a path or label.
|
||||||
def self.from(path_or_label)
|
def self.from(path_or_label)
|
||||||
return nil unless path_or_label =~ /homebrew\.mxcl\.([^\.]+)(\.plist)?\z/
|
return nil unless path_or_label =~ /homebrew\.mxcl\.([^\.]+)(\.plist)?\z/
|
||||||
new(Formula.factory(Formula.canonical_name($1))) rescue nil
|
new(Formula.factory($1)) rescue nil
|
||||||
end
|
end
|
||||||
|
|
||||||
# Initialize new `Service` instance with supplied formula.
|
# Initialize new `Service` instance with supplied formula.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user