Homebrew / homebrew-bundle

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

Fix `brew bundle --cleanup` from `stdin` #1379

Closed MikeMcQuaid closed 3 months ago

MikeMcQuaid commented 3 months ago

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.

While we're here, make some dsl usage elsewhere a little more consistent.

Fixes #1378

motohedgehog commented 3 months ago

Thanks for a quick turnaround @MikeMcQuaid! Bit ashamed that I didn't try to fix it myself, but I'd need an approval from my employer to contribute, and that could take ages :/

MikeMcQuaid commented 3 months ago

@motohedgehog No worries, you made it much easier through the write-up!

but I'd need an approval from my employer to contribute, and that could take ages :/

If I can ever help put anything in writing (or even just this) to nudge them in the right direction: shout.

It is incredibly selfish of companies to make it easy to use open source internally but hard to contribute fixes back.