I'm trying to detect if a package is installed in a bash script using the following but the script keeps erroring out and preventing anything after it from running.
Is there an option for apt that tells it to NOT throw an error when a package is not in the list?
pkgExists=$(apt list "azure-cli" | grep "azure-cli" -s)