Skip to content

Recognize different bundler environments#7

Open
rylnd wants to merge 2 commits into
masterfrom
fix_bundler_strategy
Open

Recognize different bundler environments#7
rylnd wants to merge 2 commits into
masterfrom
fix_bundler_strategy

Conversation

@rylnd
Copy link
Copy Markdown
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