
Postinstall should be executed with the spec of the target formula not the spec argument from ARGV, otherwise the prefix can be incorrect. In other words, if the stable version of a dependency gets installed, postinstall for the dependency should use the prefix of the dependency's stable version, not the prefix of its devel or head version. Fixes #2941.
Library
This directory contains all the code run by the official brew
and brew cask
commands in Homebrew
and all formulae (package descriptions) in taps (repositories containing formulae) in Taps
subdirectories.