plist_caveats: simplify the block and add a comment
Closes Homebrew/homebrew#30630. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
ddf22735db
commit
329e357d9a
@ -104,14 +104,14 @@ class Caveats
|
|||||||
else
|
else
|
||||||
s << " launchctl load #{plist_link}"
|
s << " launchctl load #{plist_link}"
|
||||||
end
|
end
|
||||||
else
|
# For startup plists, we cannot tell whether it's running on launchd,
|
||||||
if f.plist_startup
|
# as it requires for `sudo launchctl list` to get real result.
|
||||||
|
elsif f.plist_startup
|
||||||
s << "To reload #{f.name} after an upgrade:"
|
s << "To reload #{f.name} after an upgrade:"
|
||||||
s << " sudo launchctl unload #{plist_link}"
|
s << " sudo launchctl unload #{plist_link}"
|
||||||
s << " sudo cp -fv #{f.opt_prefix}/*.plist #{destination}"
|
s << " sudo cp -fv #{f.opt_prefix}/*.plist #{destination}"
|
||||||
s << " sudo launchctl load #{plist_link}"
|
s << " sudo launchctl load #{plist_link}"
|
||||||
else
|
elsif Kernel.system "/bin/launchctl list #{plist_domain} &>/dev/null"
|
||||||
if Kernel.system "/bin/launchctl list #{plist_domain} &>/dev/null"
|
|
||||||
s << "To reload #{f.name} after an upgrade:"
|
s << "To reload #{f.name} after an upgrade:"
|
||||||
s << " launchctl unload #{plist_link}"
|
s << " launchctl unload #{plist_link}"
|
||||||
s << " launchctl load #{plist_link}"
|
s << " launchctl load #{plist_link}"
|
||||||
@ -119,8 +119,6 @@ class Caveats
|
|||||||
s << "To load #{f.name}:"
|
s << "To load #{f.name}:"
|
||||||
s << " launchctl load #{plist_link}"
|
s << " launchctl load #{plist_link}"
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if f.plist_manual
|
if f.plist_manual
|
||||||
s << "Or, if you don't want/need launchctl, you can just run:"
|
s << "Or, if you don't want/need launchctl, you can just run:"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user