I got code
#!/bin/bash
set -e
helm status deployment-name
if [ $? -eq 0 ]; then
echo "uninstall helm release"
helm uninstall deployment-name
else
echo "helm reease doesnot exist"
fi
helm install ….
So script check if helm release exists, if exists we got 0, if not Error
but if not exists should go through If and print echo “helm reease doesnot exist” but we have a flag set -e that cause exit/interrupt script.
How should I implement it if the error occurs it will go to else not exit code.
helm version 3.10