diff options
| author | Finn Smith | 2014-02-19 13:51:15 -0500 |
|---|---|---|
| committer | Adam Vandenberg | 2014-02-20 22:04:16 -0800 |
| commit | e7a0af8b60c987e56a690d63a17ae0e0d1bc4a33 (patch) | |
| tree | a23a2984593aa1146d50f123e7a95b9e51cb83d3 /Library/Formula/mysql.rb | |
| parent | 63732da73ff8e8d5f40dc7e57fa31af56415c00f (diff) | |
| download | homebrew-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.rb | 5 |
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']}", |
