
Instead of only looking at the extension when invoked as part of Homebrew's formulae' download strategies instead prioritise the extension if it actually exists. When it does not, fall back to the magic detection logic which is likely to be more reliable. Fixes https://github.com/Homebrew/brew/issues/5895
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.