Skip to content

only inject preamble when the plugin is actually getting installed - #76

Merged
ccutrer merged 1 commit into
mainfrom
limit-preamble-injection
Oct 29, 2026
Merged

ccutrer merged 1 commit into
mainfrom
limit-preamble-injection

Conversation

@ccutrer

@ccutrer ccutrer commented Oct 29, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the change limiting Gemfile preamble injection to plugin installation.

No open issues 🎉

What changed in this PR

Limits Gemfile preamble injection to plugin installation, preventing ordinary Bundler commands from modifying alternate Gemfiles when loading the plugin from its index.

Changes:

  • Detects plugin installation before injecting the preamble, retaining the existing loaded and frozen-bundle checks.
  • Adds regression coverage for an alternate Gemfile using the main application's plugin index.
File Description
spec/​bundler/​multilock/​preamble_spec.rb Verifies that loading an indexed plugin leaves an alternate Gemfile unchanged.
lib/​bundler/​multilock.rb Restricts preamble injection to plugin installation.

Review effort: Balanced

@ccutrer
ccutrer merged commit c7021ec into main Oct 29, 2026
11 checks passed
@ccutrer
ccutrer deleted the limit-preamble-injection branch October 29, 2026 19:37
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.

4 participants