]> cat aescling's git repositories - mastodon.git/commitdiff
Fix "bundle exec rails mastodon:setup" crashing in some circumstances (#16976)
authorClaire <claire.github-309c@sitedethib.com>
Thu, 11 Nov 2021 13:00:30 +0000 (14:00 +0100)
committerGitHub <noreply@github.com>
Thu, 11 Nov 2021 13:00:30 +0000 (14:00 +0100)
Fix regression from #16896

lib/tasks/mastodon.rake

index 9146f78e108b44e3ed345899efc275558da5dbfd..d905a07dad42a32f209a04472e64870cdc399f1c 100644 (file)
@@ -350,11 +350,11 @@ namespace :mastodon do
           end
         end.join("\n")
 
-        generated_header = "# Generated with mastodon:setup on #{Time.now.utc}\n\n"
+        generated_header = "# Generated with mastodon:setup on #{Time.now.utc}\n\n".dup
 
         if incompatible_syntax
-          generated_header << "Some variables in this file will be interpreted differently whether you are\n"
-          generated_header << "using docker-compose or not.\n\n"
+          generated_header << "Some variables in this file will be interpreted differently whether you are\n"
+          generated_header << "using docker-compose or not.\n\n"
         end
 
         File.write(Rails.root.join('.env.production'), "#{generated_header}#{env_contents}\n")