Closed vtta closed 4 years ago
Does this leave HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK=1
set in the env
after the script has finished executing? If it does we should probably unset
it unless it exists already.
I think this variable would effect only one run, after which this generated script exits and leave no trace of ever setting this variable. But for safety, we can definitely add an unset or restore its original value at the end.
This seems fine as-is 👍. Double checked locally and as expected it doesn't seem to pass the variable back up to the parent shell. Just wanted to be sure on that.
If people object to this being set by default for this tool we can always make it conditional or add an opt-out of some description but for better or worse I know Homebrew has become such a binary-default package manager that formulae building from source has become an edge case most users would not expect or desire, so... we'll go with this and see.
Thanks for the PR @vtta!
On default, when installation from bottle fails, homebrew would fall back to build from source. But due to autoupdate happens at background, we cannot notice this in time and may often lead to unwanted battery drain. I added an environment variable in the update script to prevent this, and this method is found here