aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2015-01-19 00:50:43 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2015-01-19 00:50:43 -0200
commit0b0e9e8336772cd2543d3426de20383b7467bb2f (patch)
tree6d4bd9cd9b6ee9a00c38cecbd17195d5f9495cfe /railties
parent99b41deb995e87160e2064a98f56d4d652e5731c (diff)
parent92b19006a7ca74fadd9702b1db0642b257bf3327 (diff)
downloadrails-0b0e9e8336772cd2543d3426de20383b7467bb2f.tar.gz
rails-0b0e9e8336772cd2543d3426de20383b7467bb2f.tar.bz2
rails-0b0e9e8336772cd2543d3426de20383b7467bb2f.zip
Merge pull request #18380 from nobu/Use-EXEEXT
Use EXEEXT
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/commands/dbconsole.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/dbconsole.rb b/railties/lib/rails/commands/dbconsole.rb
index 63bf8b11ba..5175e31f14 100644
--- a/railties/lib/rails/commands/dbconsole.rb
+++ b/railties/lib/rails/commands/dbconsole.rb
@@ -171,7 +171,9 @@ module Rails
commands = Array(commands)
dirs_on_path = ENV['PATH'].to_s.split(File::PATH_SEPARATOR)
- commands += commands.map{|cmd| "#{cmd}.exe"} if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
+ unless (ext = RbConfig::CONFIG['EXEEXT']).empty?
+ commands = commands.map{|cmd| "#{cmd}#{ext}"}
+ end
full_path_command = nil
found = commands.detect do |cmd|