From b89bacb9c94e85386571c7045490b54a98f51411 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 27 Nov 2014 10:48:24 +0000 Subject: [PATCH] caveats: handle non-Homebrew plists. Mentioned in Homebrew/homebrew#34484. --- Library/Homebrew/caveats.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb index 17fdb78011..f47eed5dbb 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