summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-10-20 14:19:32 -0500
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-05 07:27:36 +0200
commite45d2272eae834880df0e90eca1387bfe1b81bee (patch)
tree6fcfec3f791c3e1efa6482e073b35a0be6552588
parent27659b9bfd3173e11a3468e4ed91236592341cb8 (diff)
downloadbundler-e45d2272eae834880df0e90eca1387bfe1b81bee.tar.gz
[Package] Always resolve remotely for --all-platforms
-rw-r--r--lib/bundler/installer.rb2
-rw-r--r--spec/commands/package_spec.rb19
2 files changed, 20 insertions, 1 deletions
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index 5bc53a8b61..700f0a4737 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -296,7 +296,7 @@ module Bundler
# returns whether or not a re-resolve was needed
def resolve_if_needed(options)
- if !@definition.unlocking? && !options["force"] && !Bundler.settings[:inline] && Bundler.default_lockfile.file?
+ if !@definition.unlocking? && !options["force"] && !options["all-platforms"] && !Bundler.settings[:inline] && Bundler.default_lockfile.file?
return false if @definition.nothing_changed? && !@definition.missing_specs?
end
diff --git a/spec/commands/package_spec.rb b/spec/commands/package_spec.rb
index 6f6d78d697..c22569171a 100644
--- a/spec/commands/package_spec.rb
+++ b/spec/commands/package_spec.rb
@@ -203,6 +203,25 @@ RSpec.describe "bundle package" do
bundle "package --all-platforms"
expect(bundled_app("vendor/cache/rack-1.0.0.gem")).to exist
end
+
+ it "does not attempt to install gems in without groups" do
+ install_gemfile! <<-G, forgotten_command_line_options(:without => "wo")
+ source "file:#{gem_repo1}"
+ gem "rack"
+ group :wo do
+ gem "weakling"
+ end
+ G
+
+ bundle! :package, "all-platforms" => true
+ expect(bundled_app("vendor/cache/weakling-0.0.3.gem")).to exist
+ expect(the_bundle).to include_gem "rack 1.0"
+ expect(the_bundle).not_to include_gem "weakling"
+
+ bundle! :install, forgotten_command_line_options(:without => "wo")
+ expect(the_bundle).to include_gem "rack 1.0"
+ expect(the_bundle).not_to include_gem "weakling"
+ end
end
context "with --frozen" do