DomT4 / homebrew-autoupdate

:tropical_drink: An easy, convenient way to automatically update Homebrew.
BSD 2-Clause "Simplified" License
987 stars 54 forks source link

Only run if plugged in #57

Closed zbot473 closed 3 years ago

zbot473 commented 3 years ago

This shouldn't be that hard to implement, just checking if the command pmset -g batt | head -n 1 | cut -d \' -f2 returns AC Power and only if it doesn't, cancel the update and potentially send the user a notification. This is useful for running upgrades on all packages due to compilation taking up cpu etc.

DomT4 commented 3 years ago

We already deliberately bar Homebrew upgrading anything from-source whilst using autoupdate since https://github.com/Homebrew/homebrew-autoupdate/commit/4082fc2bd523a45959c11c46147d2ff1a651d2f8, so CPU usage is kept fairly minimal. Can you go into more detail about what you're seeing as an issue despite that?

zbot473 commented 3 years ago

We already deliberately bar Homebrew upgrading anything from-source whilst using autoupdate since 4082fc2, so CPU usage is kept fairly minimal. Can you go into more detail about what you're seeing as an issue despite that?

I didn't realize about this, thanks for letting me know!