From 882ca35eba34b4555174be199086b577065aa885 Mon Sep 17 00:00:00 2001 From: Sergio Arroutbi Date: Fri, 17 Nov 2023 16:47:24 +0100 Subject: [PATCH] Only delete files if they exist Signed-off-by: Sergio Arroutbi --- tools/index_tools/tang_uninstall_catalog.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/index_tools/tang_uninstall_catalog.sh b/tools/index_tools/tang_uninstall_catalog.sh index 4829a132..5b877aca 100755 --- a/tools/index_tools/tang_uninstall_catalog.sh +++ b/tools/index_tools/tang_uninstall_catalog.sh @@ -15,8 +15,8 @@ # limitations under the License. # -oc delete -f tang_subscription.yaml -oc delete -f tang_catalog_source.yaml +test -f tang_subscription.yaml && oc delete -f tang_subscription.yaml +test -f tang_catalog_source.yaml && oc delete -f tang_catalog_source.yaml oc get csv -nopenshift-operators csv=$(oc get csv -n openshift-operators | grep -v NAME | head | awk '{print $1}') test -z "${csv}" || oc delete csv "${csv}" -n openshift-operators