Homebrew Python – What Does ‘link: false’ Mean in Brewfile?

homebrewpython

My Brewfile created with brew bundle dump contains one line with link: false:

...
brew "git"
brew "python@3.8", link: false
brew "glib"
...

I don't see any kind of --link option for the brew install command, so I don't think it's a record of some install option for python@3.8. The only potentially relevant thing about it I see in either the brew and homebrew-bundle documentation is the brew link command, which I have not used.

And as far as I can tell, the python3.8 command is installed and works the same as any of the other packages listed in the Brewfile.

Best Answer

The link:false in the Brewfile appears to skip linking the installed binary in /usr/local/Cellar/... into /usr/local/bin (and thus my user $PATH) during bulk installation with brew bundle install.

I am guessing since python@3.8 was installed both as a dependency for something else (and thus not linked?) and it was also installed manually, it somehow erroneously was being output in the Brewfile as link: false though it should not have been.

Getting brew bundle dump to stop outputting the link: false was accomplished by forcibly uninstalling and reinstalling:

$ brew uninstall --ignore-dependencies python@3.8
$ brew install python@3.8
$ brew bundle dump