Instead of brew cask install …, use brew install --cask ….
brew cask install …
brew install --cask …
https://github.com/Homebrew/brew/pull/8899