aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/caveats.rb
diff options
context:
space:
mode:
authorMike McQuaid2014-11-27 10:48:24 +0000
committerMike McQuaid2014-11-27 10:48:24 +0000
commitb89bacb9c94e85386571c7045490b54a98f51411 (patch)
tree6f29a60ad0c3d47c6f8b6c122320bf08b48ca1e0 /Library/Homebrew/caveats.rb
parent6017811397b7ee0797fe452309e37fb5018689a5 (diff)
downloadbrew-b89bacb9c94e85386571c7045490b54a98f51411.tar.bz2
caveats: handle non-Homebrew plists.
Mentioned in Homebrew/homebrew#34484.
Diffstat (limited to 'Library/Homebrew/caveats.rb')
-rw-r--r--Library/Homebrew/caveats.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb
index 17fdb7801..f47eed5db 100644
--- a/Library/Homebrew/caveats.rb
+++ b/Library/Homebrew/caveats.rb
@@ -108,7 +108,11 @@ class Caveats
destination = f.plist_startup ? '/Library/LaunchDaemons' \
: '~/Library/LaunchAgents'
- plist_filename = f.plist_path.basename
+ plist_filename = if f.plist
+ f.plist_path.basename
+ else
+ File.basename Dir["#{keg.to_path}/*.plist"].first
+ end
plist_link = "#{destination}/#{plist_filename}"
plist_domain = f.plist_path.basename('.plist')
destination_path = Pathname.new File.expand_path destination