Homebrew / homebrew-bundle

📦 Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask and the Mac App Store.
MIT License
5.33k stars 286 forks source link

brew bundle cleanup is uninstalling fonts - which **are still in my Brewfile** #291

Closed dstroot closed 7 years ago

dstroot commented 7 years ago

brew bundle cleanup is uninstalling fonts - which are still in my Brewfile. Then the next time I run brew bundle they get installed. then I run brew bundle cleanup and they get uninstalled. I can't figure out why cleanup thinks they should be uninstalled.

❯ brew bundle cleanup --file=$HOME/.Brewfile
Would uninstall casks:
caskroom/fonts/font-droid-sans-mono                  caskroom/fonts/font-iosevka
caskroom/fonts/font-hack                             caskroom/fonts/font-monoid
caskroom/fonts/font-hasklig                          caskroom/fonts/font-source-code-pro
caskroom/fonts/font-input

Brewfile:

# homebrew apps
tap 'homebrew/bundle'
tap 'homebrew/versions'
tap 'homebrew/core'
tap 'go-delve/delve'
# -------------------------
brew 'bash-completion'
brew 'git'

brew 'hugo'
brew 'mackup'
brew 'n'
brew 'jq'
brew 'gpm'
...

# install fonts
tap 'caskroom/fonts'
# --------------------------
cask 'font-droid-sans-mono'
cask 'font-hack'
cask 'font-hasklig'
cask 'font-monoid'
cask 'font-source-code-pro'
cask 'font-iosevka'
cask 'font-input'
MikeMcQuaid commented 7 years ago

cask 'font-droid-sans-mono'

What if you make this caskroom/fonts/font-droid-sans-mono?

adamhollett commented 7 years ago

Mike: That seems to fix an issue I had where fonts were being reinstalled every time I ran brew bundle. If I list them as caskroom/fonts/font-droid-sans-mono, I don't get that issue.

Thanks!

MikeMcQuaid commented 7 years ago

Glad you got it sorted.

dstroot commented 7 years ago

That worked for me also. Thanks Mike. What was the logic/reasoning on why this changed? (so I have a better understanding of how this works) My other casks were unaffected - only fonts.

Cheers!

MikeMcQuaid commented 7 years ago

@dstroot This was a product of using full cask names correctly in https://github.com/Homebrew/homebrew-bundle/pull/278 which would avoid clashes/inconsistency between taps. Sorry for the pain!

dstroot commented 7 years ago

Got it! Thanks - the reasoning makes a lot of sense.

dstroot commented 5 years ago

For anyone landing here now the current way to do this is:

# install fonts
tap 'homebrew/cask-fonts'
# --------------------------
cask 'font-hack'
cask 'font-hasklig'
cask 'font-monoid'
cask 'font-source-code-pro'
cask 'font-iosevka'
cask 'font-input'