diff options
| author | Xu Cheng | 2014-07-03 20:50:04 +0800 |
|---|---|---|
| committer | Mike McQuaid | 2014-08-31 19:18:11 +0100 |
| commit | 329e357d9acdd7989cb3ba6394f3b4839bb1e83f (patch) | |
| tree | e0b7640985fab1c9d15ba0ab29b636291d304737 /Library | |
| parent | ddf22735db7241f6388bd7048e4702e78eab66b2 (diff) | |
| download | brew-329e357d9acdd7989cb3ba6394f3b4839bb1e83f.tar.bz2 | |
plist_caveats: simplify the block and add a comment
Closes Homebrew/homebrew#30630.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/caveats.rb | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb index 1973dff42..fa37c6289 100644 --- a/Library/Homebrew/caveats.rb +++ b/Library/Homebrew/caveats.rb @@ -104,22 +104,20 @@ class Caveats else s << " launchctl load #{plist_link}" end - else - if f.plist_startup + # For startup plists, we cannot tell whether it's running on launchd, + # as it requires for `sudo launchctl list` to get real result. + elsif f.plist_startup s << "To reload #{f.name} after an upgrade:" s << " sudo launchctl unload #{plist_link}" s << " sudo cp -fv #{f.opt_prefix}/*.plist #{destination}" s << " sudo launchctl load #{plist_link}" - else - if Kernel.system "/bin/launchctl list #{plist_domain} &>/dev/null" - s << "To reload #{f.name} after an upgrade:" - s << " launchctl unload #{plist_link}" - s << " launchctl load #{plist_link}" - else - s << "To load #{f.name}:" - s << " launchctl load #{plist_link}" - end - end + elsif Kernel.system "/bin/launchctl list #{plist_domain} &>/dev/null" + s << "To reload #{f.name} after an upgrade:" + s << " launchctl unload #{plist_link}" + s << " launchctl load #{plist_link}" + else + s << "To load #{f.name}:" + s << " launchctl load #{plist_link}" end if f.plist_manual |
