Update and correct brew package function