Tags: homegrew/grew
Tags
feat(linker): link share/man and share/info into the prefix Remove the policy of stripping man pages and info pages. The installer no longer prunes share/man and share/info from the keg before capturing the manifest snapshot, and the linker no longer skips those entries when populating share/. Both subdirectories are now linked like any other share/ content — share/man/manN/ sections and share/info/ are materialized as real directories so multiple formulas can coexist. Also remove the associated audit warning that flagged these directories as unsupported, and the reset-update cleanup block that deleted them from the system prefix. The shellenv MANPATH/INFOPATH exports were already correct and need no change. Add debug logging to LinkWithOpts, UnlinkWithOpts, linkDirWithOpts, and unlinkDirWithOpts for opt-link lifecycle, shared-dir materialization, symlink-to-dir expansion, and per-file link/unlink events. Update README, docs/tech.md, and pkg/linker/doc.go to reflect that share/ now includes man pages and info documents.
security: root keg source traversal and unsymDir read through os.Open… …Root linkDirWithOpts: replaced os.ReadDir(srcDir) with os.OpenRoot(srcDir) + fs.ReadDir(srcRoot.FS(), ".") at every call level (including recursive ones). Closes the TOCTOU window between the caller's e.IsDir() check and the subsequent ReadDir — if a keg directory entry is raced to a symlink pointing outside the keg between those two operations, os.OpenRoot now refuses to follow it. unsymDir: replaced os.ReadDir(safeTarget) with os.OpenRoot(absRoot) + fs.ReadDir(unsymRoot.FS(), rel), using the relative path already validated by the preceding isWithinRoot and SafeJoin guards. Pins the directory read to the trusted prefix root fd rather than re-traversing the string path.
update GEMINI.md and README.md for post-v0.7.27 changes - regenerate GEMINI.md with accurate command surface, architecture, security primitives, and testing conventions - add distclean to GEMINI.md build commands - update README.md: universal binary, path-traversal hardening, build-fat-binary and distclean targets, remove completed roadmap item
feat: install accepts multiple args with --formula/--cask selection grew install now takes one or more arguments and auto-detects each as a formula or a cask (formula takes precedence). The mutually-exclusive --formula and --cask flags pin every argument to a single kind and disable the other. Arguments are processed in order; installation stops at the first failure. Enforce the count with cobra.MinimumNArgs(1) and the flag exclusivity with MarkFlagsMutuallyExclusive. Refactor RunInstall into per-arg dispatch (resolveInstallKind / installFormulaArg / installCaskArg), close a latent gap where --dry-run --cask installed anyway, and add smoke tests plus doc updates.
Fix completion cache initialization to support dynamic cacheDir param… …eter Previously, cacheDir was ignored (kept for signature compatibility). Now, when cacheDir is empty, it's dynamically resolved to the system cache dir. When provided, it's used directly (for testing or custom locations).
PreviousNext