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>
This commit is contained in:
Xu Cheng 2015-03-23 01:14:21 +08:00
parent 941842f0d6
commit 4fccab615f

View File

@ -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?