Closed uxp closed 8 years ago
See https://github.com/Homebrew/homebrew/issues/36706#issuecomment-73775085. I suspect that could well be your issue.
Library/Aliases/gearmand
appears to be the correct format (a text file who's contents are the relative path to the canonical formula file).
That's not the correct format. It should be a symbolic link pointing to the formula (like all files in Library/Aliases/
). Can you check if that's the case? I suspect something else went wrong, maybe during a brew update
. Is there something special about your git
or its configuration on your system? Have you altered the core.symlinks
configuration value of git
?
Interesting. I think I do have an issue where all the files in Library/Aliases
are standard text files, and not symlinks. There should be nothing special about my git
, but it is the Apple distributed version and not an overridden version. core.symlinks
was not set to any value.
I've been having issues after upgrading to OS X to El Capitan and not re-installing all my installed formulas, so I blew out my Homebrew install by hand and re-installed manually to try and preserve some other installed programs within /usr/local, which could definitely have caused the discrepancy.
eg:
% cd `brew --prefix`
% rm -rf Cellar
% brew prune
% rm `git ls-files`
% rm -r Library/Homebrew Library/Aliases Library/Formula Library/Contributions
% rm -rf .git
% curl -L https://github.com/Homebrew/homebrew/tarball/master | tar xz --strip 1
% brew update
After explicitly setting core.symlinks
to true, then re-installing Homebrew using the same exact procedure above, I was able to resolve my issues. Sorry for the noise.
I'm not exactly sure what is going on here.
Library/Aliases/gearmand appears to be the correct format (a text file who's contents are the relative path to the canonical formula file).
gearmand
appears to be the only file that matches the string ofarm
:My instinct is pointing to
module_eval
inside Library/Homebrew/formulary.rb slurping the contents of the alias file and trying to evaluate the relative path as a regexp replace or something, (egs/../Library/gearmand
) wheree
andm
are invalid regexp flags. This all makes perfect sense, except for the reason that we're trying tomodule_eval
the contents of files inside the Aliases directory from theload_formula
method, when it seems like it should be restricted to files within the Formula directory.