1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Use detect instead select to avoid "sh: [mysqldump]: command not found".

Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
Emilio Tagua 2010-09-29 13:23:05 -03:00 committed by José Valim
parent d2ea2e1d5f
commit 61cf11247b

View file

@ -88,7 +88,7 @@ else
)
end
mysqldump_bin = %w[mysqldump mysqldump5].select { |bin| `which #{bin}`.length > 0 }
mysqldump_bin = %w[mysqldump mysqldump5].detect { |bin| `which #{bin}`.length > 0 }
`#{mysqldump_bin} -u #{conn[:username]} #{"-p#{conn[:password]}" unless conn[:password].blank?} #{conn[:database]} exhibits users > #{sqlfile}`
end