Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tap directive added to main Brewfile when only used in host-based Brewfile #76

Closed
kyounger opened this issue Aug 2, 2017 · 1 comment

Comments

@kyounger
Copy link

kyounger commented Aug 2, 2017

In my main Brewfile I have basic stuff, but do not have tap caskroom/versions specified, because the main Brewfile specifies nothing from that tap.

In the Host1.Brewfile, I do not have tap caskroom/versions specified, as again, nothing for that host uses that tap.

In the Host2.Brewfile, I DO have tap caskroom/versions specified, and have a cask installed from it.

When I run brew file init (or anything that triggers it) on Host2, it updates the main Brewfile with tap caskroom/versions (and only this line, it doesn't add the actual cask thankfully).

Not sure if this is intended behavior, but it does throw off my repo each time I update (constantly removing the line in Brewfile on one host and adding back on the other).

@rcmdnk
Copy link
Owner

rcmdnk commented Aug 2, 2017

It is intended, because brew file init just writes out what a machine has,
and Host1 doesn't have caskroom/versions and Host2 has it.

To synchronize two machines, use brew file update, instead of init.
This will install caskroom/versions and instal an application, which is installed in Host2, to Host1.

If you want to use different applications in two machines, you can use file option.

Edit Brewfile by yourself (you can open if by brew file edit).
Your main Brew file should be like:

tap caskroom/cask
cask AAA
cask BBB
...

tap homebrew/core
brew aaa
brew bbb
...

file ~/.Brewfile.local

Then, at Host2, prepare ~/.Brewfile.local like:

tap cask/versions
cask CCC

At Host1, you don't need to do anything.

Once it has done, use brew file update to update Brewfile on each machine.
Don't use init, because it overwrite fully (will make Brewfile what you have now).

@rcmdnk rcmdnk closed this as completed Aug 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants