Skip to content

Commit 8d2669d

Browse files
authored
Merge pull request #9616 from ruby/claude/great-archimedes-71fdb7
Fix ruby-core tarball detection in linked git worktrees
2 parents a89e1cb + 4294b3a commit 8d2669d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

spec/support/path.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,9 @@ def man_tracked_files_glob
357357
end
358358

359359
def ruby_core_tarball?
360-
!git_root.join(".git").directory?
360+
# A tarball checkout has no `.git` entry at all. Note that `.git` may be
361+
# a file rather than a directory in linked git worktrees.
362+
!git_root.join(".git").exist?
361363
end
362364

363365
def rubocop_gemfile_basename

0 commit comments

Comments
 (0)