Skip to content

Fix ruby-core tarball detection in linked git worktrees#9616

Merged
hsbt merged 1 commit into
masterfrom
claude/great-archimedes-71fdb7
Jun 11, 2026
Merged

Fix ruby-core tarball detection in linked git worktrees#9616
hsbt merged 1 commit into
masterfrom
claude/great-archimedes-71fdb7

Conversation

@hsbt

@hsbt hsbt commented Jun 11, 2026

Copy link
Copy Markdown
Member

What was the end-user or developer problem that led to this PR?

In a linked worktree .git is a gitdir pointer file, not a directory, so ruby_core_tarball? misdetected the checkout as a tarball and shipped_files mapped exe/ to libexec/, failing the whole test suite.

What is your fix for the problem, implemented in this PR?

Use exist? instead of directory?.

Make sure the following tasks are checked

In a linked worktree `.git` is a gitdir pointer file, not a directory,
so ruby_core_tarball? misdetected the checkout as a tarball and
shipped_files mapped exe/ to libexec/, failing the whole suite with
Errno::ENOENT in before(:suite). A tarball has no `.git` entry at all,
so checking existence is enough.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 11, 2026 21:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes Bundler spec helper logic that incorrectly treated linked git worktrees (where .git is a file pointing to the real gitdir) as tarball checkouts, which caused shipped_files to remap exe/ to libexec/ and break the test suite in that environment.

Changes:

  • Update ruby_core_tarball? to detect tarball checkouts by checking for existence of .git rather than requiring it to be a directory.
  • Add clarifying comment explaining .git being a file in linked worktrees.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hsbt hsbt merged commit 8d2669d into master Jun 11, 2026
111 checks passed
@hsbt hsbt deleted the claude/great-archimedes-71fdb7 branch June 11, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants