aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorXu Cheng2015-03-23 01:14:21 +0800
committerXu Cheng2015-03-23 18:35:58 +0800
commit4fccab615fe2882cd9210d017a2995348e1b9e27 (patch)
tree178ab273550ace596162febacd795672582d2427 /Library
parent941842f0d66740f6ef96005d5440c789828aceab (diff)
downloadbrew-4fccab615fe2882cd9210d017a2995348e1b9e27.tar.bz2
install_plist: create var/log path
Let homebrew create var/log path to avoid permission problem. Closes Homebrew/homebrew#37966 Closes Homebrew/homebrew#37967. Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_installer.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 5ef6660fd..1e6903be6 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -560,6 +560,8 @@ class FormulaInstaller
return unless formula.plist
formula.plist_path.atomic_write(formula.plist)
formula.plist_path.chmod 0644
+ log = formula.var/"log"
+ log.mkpath if formula.plist.include? log.to_s
rescue Exception => e
onoe "Failed to install plist file"
ohai e, e.backtrace if debug?