Only call proc if it is set
Only call proc if it is set

Fixes Homebrew/homebrew#30723.
Fixes Homebrew/homebrew#30724.
Fixes Homebrew/homebrew#30727.

alyssais/brew,vitorgalvao/brew,gordonmcshane/homebrew,reelsense/brew,amar-laksh/brew_sudo,ilovezfs/brew,vitorgalvao/brew,Linuxbrew/brew,hanxue/linuxbrew,mahori/brew,DomT4/brew,bfontaine/brew,reitermarkus/brew,amar-laksh/brew_sudo,tonyg/homebrew,palxex/brew,mgrimes/brew,mistydemeo/homebrew,alyssais/brew,rwhogg/brew,Homebrew/brew,Linuxbrew/brew,EricFromCanada/brew,ilovezfs/brew,maxim-belkin/brew,mistydemeo/homebrew,gregory-nisbet/brew,reelsense/brew,hanxue/linuxbrew,konqui/brew,rwhogg/brew,gregory-nisbet/brew,bfontaine/brew,Homebrew/brew,claui/brew,staticfloat/brew,nandub/brew,Homebrew/brew,nandub/brew,aw1621107/brew,vitorgalvao/brew,mgrimes/brew,nandub/brew,reitermarkus/brew,MikeMcQuaid/brew,EricFromCanada/brew,aw1621107/brew,toonetown/homebrew,JCount/brew,DomT4/brew,DomT4/brew,EricFromCanada/brew,mahori/brew,hanxue/linuxbrew,nandub/brew,reitermarkus/brew,gordonmcshane/homebrew,Linuxbrew/brew,bfontaine/brew,pseudocody/brew,maxim-belkin/brew,sjackman/homebrew,konqui/brew,JCount/brew,claui/brew,sjackman/homebrew,toonetown/homebrew,mgrimes/brew,AnastasiaSulyagina/brew,muellermartin/dist,pseudocody/brew,muellermartin/dist,gregory-nisbet/brew,alyssais/brew,mahori/brew,jmsundar/brew,staticfloat/brew,palxex/brew,mistydemeo/homebrew,sjackman/homebrew,ilovezfs/brew,amar-laksh/brew_sudo,pseudocody/brew,EricFromCanada/brew,MikeMcQuaid/brew,zmwangx/brew,mahori/brew,claui/brew,Homebrew/brew,JCount/brew,palxex/brew,konqui/brew,AnastasiaSulyagina/brew,MikeMcQuaid/brew,toonetown/homebrew,gordonmcshane/homebrew,zmwangx/brew,reitermarkus/brew,muellermartin/dist,rwhogg/brew,konqui/brew,Linuxbrew/brew,MikeMcQuaid/brew,aw1621107/brew,maxim-belkin/brew,JCount/brew,claui/brew,DomT4/brew,jmsundar/brew,tonyg/homebrew,AnastasiaSulyagina/brew,zmwangx/brew,sjackman/homebrew,tonyg/homebrew,reelsense/brew,vitorgalvao/brew,staticfloat/brew,jmsundar/brew