Skip to content

Commit f23ede5

Browse files
authored
Add one platform at the time (rails#47516)
1 parent 8604dc8 commit f23ede5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

railties/lib/rails/generators/app_base.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,12 +642,14 @@ def run_bundle
642642
bundle_command("install", "BUNDLE_IGNORE_MESSAGES" => "1")
643643

644644
# The vast majority of Rails apps will be deployed on `x86_64-linux`.
645-
platform = ["--add-platform=x86_64-linux"]
645+
platforms = ["--add-platform=x86_64-linux"]
646646

647647
# Users that develop on M1 mac may use docker and would need `aarch64-linux` as well.
648-
platform << "--add-platform=aarch64-linux" if RUBY_PLATFORM.start_with?("arm64")
648+
platforms << "--add-platform=aarch64-linux" if RUBY_PLATFORM.start_with?("arm64")
649649

650-
bundle_command("lock #{platform.join(" ")}", "BUNDLE_IGNORE_MESSAGES" => "1")
650+
platforms.each do |platform|
651+
bundle_command("lock #{platform}", "BUNDLE_IGNORE_MESSAGES" => "1")
652+
end
651653
end
652654
end
653655

0 commit comments

Comments
 (0)