aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/mysql.rb
diff options
context:
space:
mode:
authorFinn Smith2014-02-19 13:51:15 -0500
committerAdam Vandenberg2014-02-20 22:04:16 -0800
commite7a0af8b60c987e56a690d63a17ae0e0d1bc4a33 (patch)
treea23a2984593aa1146d50f123e7a95b9e51cb83d3 /Library/Formula/mysql.rb
parent63732da73ff8e8d5f40dc7e57fa31af56415c00f (diff)
downloadhomebrew-e7a0af8b60c987e56a690d63a17ae0e0d1bc4a33.tar.bz2
Fix datadir.mkpath for bottled mysql server
Moved datadir.mkpath (i.e. the creation of var/mysql) to the post_install function. This ensures that the path is created with both compiled and bottled percona-server. Without this fix when this formula is bottled it errors on install. Closes #26841. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/mysql.rb')
-rw-r--r--Library/Formula/mysql.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/Library/Formula/mysql.rb b/Library/Formula/mysql.rb
index 0b0ff2f93..f054e43f9 100644
--- a/Library/Formula/mysql.rb
+++ b/Library/Formula/mysql.rb
@@ -118,12 +118,11 @@ class Mysql < Formula
libexec.mkpath
mv "#{bin}/mysqlaccess", libexec
mv "#{bin}/mysqlaccess.conf", libexec
-
- # Make sure the var/mysql directory exists
- (var+"mysql").mkpath
end
def post_install
+ # Make sure the var/mysql directory exists
+ (var+"mysql").mkpath
unless File.exist? "#{var}/mysql/mysql/user.frm"
ENV['TMPDIR'] = nil
system "#{bin}/mysql_install_db", '--verbose', "--user=#{ENV['USER']}",