brew cask Update or uninstall error: definition is invalid: invalid ‘depends_on macos’ value: “:lion”

Homebrew cask developers deleted pre-maverics dependencies support due to the high maintenance overhead and it looks like they introduced a bug.

The way to fix it is to run:

/usr/bin/find "$(brew --prefix)/Caskroom/"*'/.metadata' -type f -name '*.rb' -print0 | /usr/bin/xargs -0 /usr/bin/perl -i -0pe 's/depends_on macos: \[.*?\]//gsm;s/depends_on macos: .*//g'

You can find this solution, the reason for this error and more info in:

https://github.com/Homebrew/homebrew-cask/issues/58046

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)