From f5f5c2188b493ccc238abaab4261bb7f23c6b4b1 Mon Sep 17 00:00:00 2001 From: Aaron Suggs Date: Mon, 3 Dec 2012 15:22:18 -0500 Subject: [PATCH] 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 --- Library/Contributions/cmds/brew-services.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Contributions/cmds/brew-services.rb b/Library/Contributions/cmds/brew-services.rb index 4cf15da592..143ba57431 100755 --- a/Library/Contributions/cmds/brew-services.rb +++ b/Library/Contributions/cmds/brew-services.rb @@ -311,8 +311,8 @@ class Service # Delegate access to `formula.name`. def name; @name ||= formula.name end - # Label, static, always looks like `com.github.homebrew.`. - def label; @label ||= "com.github.homebrew.#{name}" end + # Label delegates to formula.plist_name, e.g `homebrew.mxcl.`. + def label; @label ||= formula.plist_name end # Path to a static plist file, this is always `com.github.homebrew..plist`. def plist; @plist ||= formula.prefix + "#{label}.plist" end