Browse files

Use --rc= instead of --rc

  • Loading branch information...
1 parent 65113fd commit 51030364ec2b5f74381725aa49f73af34d690f8c @robertomiranda robertomiranda committed Feb 4, 2013
Showing with 6 additions and 2 deletions.
  1. +6 −2 railties/lib/rails/commands/application.rb
View
8 railties/lib/rails/commands/application.rb
@@ -10,8 +10,12 @@
else
ARGV.shift
unless ARGV.delete("--no-rc")
- customrc = ARGV.index('--rc')
- railsrc = customrc ? ARGV.slice!(customrc, 2).last : File.join(File.expand_path("~"), '.railsrc')
+ customrc = ARGV.index{ |x| x.include?("--rc=") }
+ railsrc = if customrc
+ File.expand_path(ARGV.delete_at(customrc).gsub(/--rc=/, ""))
+ else
+ File.join(File.expand_path("~"), '.railsrc')
+ end
if File.exist?(railsrc)
extra_args_string = File.read(railsrc)
extra_args = extra_args_string.split(/\n+/).map {|l| l.split}.flatten

0 comments on commit 5103036

Please sign in to comment.