lib/rails/generators/rails/db/system/change/change_generator.rb in railties-7.1.1 vs lib/rails/generators/rails/db/system/change/change_generator.rb in railties-7.1.2
- old
+ new
@@ -39,9 +39,12 @@
gsub_file("Gemfile", all_database_gems_regex, name)
gsub_file("Gemfile", gem_entry_regex_for(name), gem_entry_for(name, *version))
end
def edit_dockerfile
+ dockerfile_path = File.expand_path("Dockerfile", destination_root)
+ return unless File.exist?(dockerfile_path)
+
build_name = docker_for_database_build
deploy_name = docker_for_database_deploy
if build_name
gsub_file("Dockerfile", all_docker_builds_regex, build_name)
end