Skip to content

Commit f921804

Browse files
Merge pull request rails#47444 from ghiculescu/rails-new-dev-path
Fix `rails new --dev APP_PATH` command crashing Co-authored-by: Jean Boussier <[email protected]>
2 parents bde7821 + eded54b commit f921804

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

railties/lib/rails/generators/app_base.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,8 @@ def target_rails_prerelease(self_command = "new")
635635

636636
run_bundle
637637

638-
@argv[0] = destination_root
638+
@argv.delete_at(@argv.index(app_path))
639+
@argv.unshift(destination_root)
639640
require "shellwords"
640641
bundle_command("exec rails #{self_command} #{Shellwords.join(@argv)}")
641642
exit

0 commit comments

Comments
 (0)