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 <mike@mikemcquaid.com>
This commit is contained in:
parent
f42f4e45c1
commit
63e56fd4df
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user