From 63e56fd4dfcd2a50e9c9d67c4777dcf450aad96a Mon Sep 17 00:00:00 2001 From: Bo Jeanes Date: Mon, 10 Feb 2014 21:24:59 -0800 Subject: [PATCH] brew-services: don't hardcode launchctl path This change allows users to install the `launchctl` wrapper in the `reattach-to-user-namespace` formula which makes the command work in Tmux and other non-standard environments. Closes Homebrew/homebrew#26609. Signed-off-by: Mike McQuaid --- Library/Contributions/cmd/brew-services.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Contributions/cmd/brew-services.rb b/Library/Contributions/cmd/brew-services.rb index 308c5ef114..0149b23821 100755 --- a/Library/Contributions/cmd/brew-services.rb +++ b/Library/Contributions/cmd/brew-services.rb @@ -94,7 +94,7 @@ module ServicesCli def bin; "brew services" end # Path to launchctl binary. - def launchctl; "/bin/launchctl" end + def launchctl; which("launchctl") end # Wohoo, we are root dude! def root?; Process.uid == 0 end