Skip to content
Browse files

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

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent d2ea2e1 commit 61cf11247bfdb243625cda93fb08afaacebe1381 @miloops miloops committed with josevalim Sep 29, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/examples/performance.rb
View
2 activerecord/examples/performance.rb
@@ -88,7 +88,7 @@ def self.feel(exhibits) exhibits.each { |e| e.feel } end
)
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

0 comments on commit 61cf112

Please sign in to comment.
Something went wrong with that request. Please try again.