mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Use --rc= instead of --rc
This commit is contained in:
parent
65113fd2c8
commit
51030364ec
1 changed files with 6 additions and 2 deletions
|
@ -10,8 +10,12 @@ if ARGV.first != "new"
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue