diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 20b5340203..09be2db68c 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -433,7 +433,7 @@ module Bundler raise ProductionError, "Your bundle only supports platforms #{@platforms.map(&:to_s)} " \ "but your local platform is #{Bundler.local_platform}. " \ - "Add the current platform to the lockfile with `bundle lock --add-platform #{Bundler.local_platform}` and try again." + "Add the current platform to the lockfile with\n`bundle lock --add-platform #{Bundler.local_platform}` and try again." end def add_platform(platform) diff --git a/spec/bundler/commands/install_spec.rb b/spec/bundler/commands/install_spec.rb index 56f657521f..9e06c51a08 100644 --- a/spec/bundler/commands/install_spec.rb +++ b/spec/bundler/commands/install_spec.rb @@ -856,7 +856,7 @@ RSpec.describe "bundle install with gem sources" do expect(err).to eq( "Your bundle only supports platforms [\"x86_64-darwin-19\"] but your local platform is x86_64-linux. " \ - "Add the current platform to the lockfile with `bundle lock --add-platform x86_64-linux` and try again." + "Add the current platform to the lockfile with\n`bundle lock --add-platform x86_64-linux` and try again." ) end end