提交 e813ad2a 编写于 作者: U unknown 提交者: Jeremy Kemper

Make db console work for all versions of ruby on Windows.

[#3999 state:committed]
Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
上级 176fbfd6
require 'erb'
require 'yaml'
require 'optparse'
require 'rbconfig'
module Rails
class DBConsole
......@@ -41,7 +42,7 @@ def start
def find_cmd(*commands)
dirs_on_path = ENV['PATH'].to_s.split(File::PATH_SEPARATOR)
commands += commands.map{|cmd| "#{cmd}.exe"} if RUBY_PLATFORM =~ /win32/
commands += commands.map{|cmd| "#{cmd}.exe"} if Config::CONFIG['host_os'] =~ /mswin|mingw/
full_path_command = nil
found = commands.detect do |cmd|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册