Skip to content

fix: install man pages before pkgshare.install in Homebrew formula#113

Merged
avihut merged 1 commit intomasterfrom
fix/homebrew-man-page-install-order
Jan 28, 2026
Merged

fix: install man pages before pkgshare.install in Homebrew formula#113
avihut merged 1 commit intomasterfrom
fix/homebrew-man-page-install-order

Conversation

@avihut
Copy link
Owner

@avihut avihut commented Jan 28, 2026

Summary

  • Fixes the order of man page installation in the Homebrew formula modification

Problem

After v1.0.13 was released with man pages included in the binary tarballs, the test-homebrew workflow still failed because man pages weren't being installed properly.

Root cause: The awk command in release.yml inserted man1.install Dir[buildpath/"man/*.1"] AFTER pkgshare.install(*leftover_contents). But leftover_contents included the man directory, which got moved to pkgshare before man1.install could access it.

Solution

Updated the awk command to:

  1. Exclude "man" from leftover_contents so it doesn't get moved to pkgshare
  2. Insert man page installation BEFORE pkgshare.install runs

Before (broken):

leftover_contents = Dir["*"] - doc_files
pkgshare.install(*leftover_contents) unless leftover_contents.empty?

# Install pre-generated man pages
man1.install Dir[buildpath/"man/*.1"]  # TOO LATE - man/ already moved!

After (fixed):

leftover_contents = Dir["*"] - doc_files - ["man"]

# Install pre-generated man pages
man1.install Dir[buildpath/"man/*.1"]  # man/ still exists here

pkgshare.install(*leftover_contents) unless leftover_contents.empty?

Test plan

  • Verified awk command produces correct output locally
  • CI passes
  • After release → test-homebrew passes

🤖 Generated with Claude Code

The previous awk command inserted man page installation AFTER
pkgshare.install, but leftover_contents included the man directory,
which got moved to pkgshare before man1.install could access it.

Fixed by:
1. Excluding "man" from leftover_contents so it doesn't get moved
2. Installing man pages BEFORE pkgshare.install runs

This ensures man pages are properly installed and discoverable via `man`.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@avihut avihut force-pushed the fix/homebrew-man-page-install-order branch from 9378b8b to fc0798e Compare January 28, 2026 22:59
@avihut avihut merged commit 111748c into master Jan 28, 2026
5 checks passed
@avihut avihut deleted the fix/homebrew-man-page-install-order branch January 28, 2026 23:02
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.

1 participant