In Brew v3 that supports new Macs M1, local path starts with /opt/homebrew and no more /usr/local
scripts could add :
#LOCAL_DIR=/usr/local LOCAL_DIR=/opt/homebrew
and then use $LOCAL_DIR