I just noticed during scripting that it's very hard to ensure that a snap is installed and refreshed if already installed because snap install
fails if the snap is already installed and snap refresh
fails if the snap is not installed yet. Am I missing some option listed or not listed in the --help
of either command?
I know how to script this with snap list
or even rudimentary with ||
in bash (missing a ton of error cases). But there has to be an option, right?
I'm using Ubuntu 23.10.