From 17bb531f82b33a8c6365f73f7577ee1f3a37ef1a Mon Sep 17 00:00:00 2001 From: yuki3738 Date: Tue, 16 Dec 2014 19:28:00 +0900 Subject: Add a code checking about file or not to the rails db command --- railties/lib/rails/commands/dbconsole.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib') diff --git a/railties/lib/rails/commands/dbconsole.rb b/railties/lib/rails/commands/dbconsole.rb index 9014560611..0d8b3de0eb 100644 --- a/railties/lib/rails/commands/dbconsole.rb +++ b/railties/lib/rails/commands/dbconsole.rb @@ -178,7 +178,7 @@ module Rails found = commands.detect do |cmd| dirs_on_path.detect do |path| full_path_command = File.join(path, cmd) - File.executable? full_path_command + File.file?(full_path_command) && File.executable?(full_path_command) end end -- cgit v1.2.3