brew-services: fix by using formula.plist_name.
Fixes errors like: ``` $ brew services restart mysql Error: Formula `mysql` not installed, #startup_plist not implemented or no plist file found ``` Closes Homebrew/homebrew#16378. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
9342a42386
commit
f5f5c2188b
@ -311,8 +311,8 @@ class Service
|
|||||||
# Delegate access to `formula.name`.
|
# Delegate access to `formula.name`.
|
||||||
def name; @name ||= formula.name end
|
def name; @name ||= formula.name end
|
||||||
|
|
||||||
# Label, static, always looks like `com.github.homebrew.<formula>`.
|
# Label delegates to formula.plist_name, e.g `homebrew.mxcl.<formula>`.
|
||||||
def label; @label ||= "com.github.homebrew.#{name}" end
|
def label; @label ||= formula.plist_name end
|
||||||
|
|
||||||
# Path to a static plist file, this is always `com.github.homebrew.<formula>.plist`.
|
# Path to a static plist file, this is always `com.github.homebrew.<formula>.plist`.
|
||||||
def plist; @plist ||= formula.prefix + "#{label}.plist" end
|
def plist; @plist ||= formula.prefix + "#{label}.plist" end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user