Skip to content

Commit

Permalink
Introduce disable_bundled_gems_load_path
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Jul 11, 2023
1 parent faffdd4 commit 0cd3790
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/bundler/man/bundle-config.1
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ The following is a list of all configuration keys and their purpose\. You can le
\fBdisable_local_revision_check\fR (\fBBUNDLE_DISABLE_LOCAL_REVISION_CHECK\fR): Allow Bundler to use a local git override without checking if the revision present in the lockfile is present in the repository\.
.
.IP "\(bu" 4
\fBdisable_bundled_gems_load_path\fR (\fBBUNDLE_DISABLE_BUNDLED_GEMS_LOAD_PATH\fR): Stop to add the \fBbundled_gems\fR load paths to \fB$LOAD_PATH\fR under the Bundler environment\.
.
.IP "\(bu" 4
\fBdisable_shared_gems\fR (\fBBUNDLE_DISABLE_SHARED_GEMS\fR): Stop Bundler from accessing gems installed to RubyGems\' normal location\.
.
.IP "\(bu" 4
Expand Down
3 changes: 3 additions & 0 deletions lib/bundler/man/bundle-config.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
* `disable_local_revision_check` (`BUNDLE_DISABLE_LOCAL_REVISION_CHECK`):
Allow Bundler to use a local git override without checking if the revision
present in the lockfile is present in the repository.
* `disable_bundled_gems_load_path` (`BUNDLE_DISABLE_BUNDLED_GEMS_LOAD_PATH`):
Stop to add the `bundled_gems` load paths to `$LOAD_PATH` under the
Bundler environment.
* `disable_shared_gems` (`BUNDLE_DISABLE_SHARED_GEMS`):
Stop Bundler from accessing gems installed to RubyGems' normal location.
* `disable_version_check` (`BUNDLE_DISABLE_VERSION_CHECK`):
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/runtime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def setup(*groups)
spec.load_paths.reject {|path| $LOAD_PATH.include?(path) }
end.reverse.flatten

load_paths.concat(bundled_load_paths).uniq!
load_paths.concat(bundled_load_paths).uniq! unless Bundler.settings[:disable_bundled_gems_load_path]

Bundler.rubygems.add_to_load_path(load_paths)

Expand Down
1 change: 1 addition & 0 deletions lib/bundler/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class Settings
disable_exec_load
disable_local_branch_check
disable_local_revision_check
disable_bundled_gems_load_path
disable_shared_gems
disable_version_check
force_ruby_platform
Expand Down

0 comments on commit 0cd3790

Please sign in to comment.