-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
brew bundle [install] --cleanup removes dependencies when reading from stdin #1378
Comments
i've got a feeling you're redirection isn't actually going to stdin in time. the what does behaviour |
@jacobbednarz my shell knowledge may be a bit rusty, but I don't think That said, I've got very similar suspicions: an empty It's been a while since I did any Ruby so I haven't looked at the implementation TBH. |
This was previously failing to read a valid `Brewfile` on repeated reads so attempting to cleanup everything. Instead, cache the `Brewfile` DSL in the `install` command and pass it to the `cleanup` command. Fixes #1378
Exactly this. Fixed in #1379. Thanks for the great report @motohedgehog! |
nice find! |
Overview
I did my best to find any similar bug reports, but couldn't, so here goes.
I've run into a weird
brew bundle
behaviour while working on declarative package management in my personal dotfiles repo (I use chezmoi).How To Reproduce
I could reproduce the problem on a pristine macOS 14.5 running under UTM and a clean Homebrew installation.
Suppose I install one formula and one cask:
I then run
brew bundle dump
and get myBrewfile
:At this point, I expect
brew bundle [install] --cleanup
to be a no-op. At a first glance, it is:However, things change if I pass the very same Brewfile via stdin:
Homebrew says
Bundle complete
, but then immediately proceeds to remove both the formula and the cask.Running
brew bundle
again exhibits even more bizarre behaviour as it install the formula and the cask again, and then removes the cask only:Debug Information
I hope I am just missing something obvious, but so far I've been puzzled, so any help would be appreciated!
The text was updated successfully, but these errors were encountered: