Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix bad logic in determining if in rails app subdir

Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
  • Loading branch information...
commit b6f99325613baf0534c10677da9c82ac27b628c0 1 parent d283ca3
@chad chad authored dhh committed
Showing with 2 additions and 1 deletion.
  1. +2 −1  railties/lib/rails/script_rails_loader.rb
View
3  railties/lib/rails/script_rails_loader.rb
@@ -7,6 +7,7 @@ module ScriptRailsLoader
def self.exec_script_rails!
cwd = Dir.pwd
+ return unless in_rails_application? || in_rails_application_subdirectory?
exec RUBY, SCRIPT_RAILS, *ARGV if in_rails_application?
Dir.chdir("..") do
# Recurse in a chdir block: if the search fails we want to be sure
@@ -18,7 +19,7 @@ def self.exec_script_rails!
end
def self.in_rails_application?
- File.exists?(SCRIPT_RAILS) || in_rails_application_subdirectory?
+ File.exists?(SCRIPT_RAILS)
end
def self.in_rails_application_subdirectory?(path = Pathname.new(Dir.pwd))
Please sign in to comment.
Something went wrong with that request. Please try again.