Skip to content

Commit cd06bc5

Browse files
committed
Find non-default Homebrew installations in $HOMEBREW_ROOT
Fixes #788
1 parent df7a370 commit cd06bc5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/mysql2/extconf.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ def add_ssl_defines(header)
5252
/usr/local/opt/mysql5*
5353
).map { |dir| dir << '/bin' }
5454

55+
# For those without HOMEBREW_ROOT in PATH
56+
dirs << "#{ENV['HOMEBREW_ROOT']}/bin" if ENV['HOMEBREW_ROOT']
57+
5558
GLOB = "{#{dirs.join(',')}}/{mysql_config,mysql_config5,mariadb_config}"
5659

5760
# If the user has provided a --with-mysql-dir argument, we must respect it or fail.

0 commit comments

Comments
 (0)