Skip to content

Commit e489942

Browse files
committed
Create the vendor dir if needed
1 parent 4dec034 commit e489942

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ext/mysql2/extconf.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,12 @@ def asplode lib
124124
end
125125

126126
# Vendor libmysql.dll
127-
vendordll = File.expand_path('../../../vendor/libmysql.dll', __FILE__)
127+
vendordir = File.expand_path('../../../vendor/', __FILE__)
128+
directory vendordir
129+
130+
vendordll = File.join(vendordir, 'libmysql.dll')
128131
dllfile = File.expand_path(File.join(rpath_dir, 'libmysql.dll'))
129-
file vendordll => dllfile do |t|
132+
file vendordll => [dllfile, vendordir] do |t|
130133
when_writing 'copying libmysql.dll' do
131134
cp dllfile, vendordll
132135
end

0 commit comments

Comments
 (0)