Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watchman: launchctl unload post-install #9456

Merged
merged 1 commit into from
Feb 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Formula/watchman.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ def install
def post_install
(var/"run/watchman").mkpath
chmod 042777, var/"run/watchman"
# Older versions would use socket activation in the launchd.plist, and since
# the homebrew paths are versioned, this meant that launchd would continue
# to reference the old version of the binary after upgrading.
# https://github.com/facebook/watchman/issues/358
# To help swing folks from an older version to newer versions, force unloading
# the plist here. This is needed even if someone wanted to add brew services
# support; while there are still folks with watchman <4.8 this is still an
# upgrade concern.
home = ENV["HOME"]
system "launchctl", "unload",
"-F", "#{home}/Library/LaunchAgents/com.github.facebook.watchman.plist"
end

test do
Expand Down