How to Prevent bench update from custom app

Hi all,

Since apps might break upon update, is there a way I can prevent or at the very least warn the user before running a bench update from my custom app. Maybe a hook?
If there isn’t, I will be more than happy to code this out for the community.

Thanks