Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Failing spec for BUNDLE_NO_INSTALL breaking bundle install #3966

Closed
wants to merge 1 commit into from
Closed

Failing spec for BUNDLE_NO_INSTALL breaking bundle install #3966

wants to merge 1 commit into from

Conversation

chulkilee
Copy link
Contributor

Problem:

  1. Run bundle package --all --no-installl on build machine during build
  2. Run bundle install --deployment on target machine
  3. It does not install any gems because BUNDLE_NO_INSTALL is set at .bundle/config.

A possible workaround is to remove the line from the config, but I believe bundle install should ignore BUNDLE_NO_INSTALL.

Another way to solve it is adding a new option to bundle install to force install --force-install. If we really need to keep the current behavior, we should do that. Otherwise, this PR would work.

@segiddins
Copy link
Member

This breaks the tests. https://travis-ci.org/bundler/bundler/jobs/77554699#L2217

@chulkilee
Copy link
Contributor Author

Oh, it's more complicated.. It looks like

  • CLI::Package uses CLI::Install to fetch gems before package
  • CLI::Package uses Bundle.settings to pass no-install option down to Bundler::Source::Rubygems, which is pretty bad like a global variable :(

For now, I just added a failing test to showbundle install wouldn't install after bundle package --no-install.

@indirect indirect changed the title bundle install should ignore BUNDLE_NO_INSTALL Failing spec for BUNDLE_NO_INSTALL breaking bundle install Aug 29, 2015
@segiddins
Copy link
Member

I think I have a fix for this, just let me finish running the specs and I'll make a PR. Thanks so much for the failing test case, @chulkilee !

homu added a commit that referenced this pull request Feb 25, 2016
[CLI] Ensure `bundle install` will always install

Closes #3966.
@homu homu closed this in #4308 Feb 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants