001-homebrewcask.1d.sh:
fao @srdgh -
I get an error when running the Homebrew cask plugin

Thanks for raising this issue, @ricounet67.
Unfortunately, I no longer have a MacOS computer, and so am no longer able to maintain this plugin (i.e. test whether it works). I do miss the beauty of the bitbar/xbar system.
Can I ask -- is the situation that this was working for you before now, and has just stopped, or is it that you have freshly activated it, and it is not working from the beginning? If the latter, I wonder whether this is due to some changes in the way Homebrew operates (I must have made this almost a decade ago!).
Good luck. I would be happy to help if I can -- but if anyone else has the solution, please feel free to implement it!
May I suggest using meta_package_manager.7h.py as an alternative? See the documentation at: https://kdeldycke.github.io/meta-package-manager/xbar.html
@ricounet67
We recently merged in another alternative offering the same functionality and more. The plugin browser has not been updated yet to include it, but you can grab the source directly to install it. Comes with a variable allowing you to set the Homebrew path based on your machine -- Intel vs Apple M1 silicon.