Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recognize different bundler environments #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rylnd
Copy link
Contributor

@rylnd rylnd commented Jun 2, 2017

Fixes #6

When running bundler from Ruby, by default it will inherit the current
bundler environment. For oss-inventory, that isn't what we want.

We need to do two things here:

  1. Tell bundler to refresh its environment by wrapping our system calls
    in a Bundler.with_clean_env block.
  2. Ensure that we have local copies of the project's gems (required by
    bundle show) by doing a bundle install.

See
https://stackoverflow.com/questions/25615289/run-bundle-system-command-in-subfolder
for more details on the issue that this addresses.

When running bundler from Ruby, by default it will inherit the current
bundler environment. For oss-inventory, that isn't what we want.

We need to do two things here:

1. Tell bundler to refresh its environment by wrapping our system calls
in a `Bundler.with_clean_env` block.
2. Ensure that we have local copies of the project's gems (required by
`bundle show`) by doing a `bundle install`.

See
https://stackoverflow.com/questions/25615289/run-bundle-system-command-in-subfolder
for more details on the issue that this addresses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants