Skip to content

Commit f798f60

Browse files
committed
Delete catalog files with -rm -rf to skip deletion errors
Use delete with 'force' to skip removing files that don't exist
1 parent 57519c8 commit f798f60

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,8 @@ build-tools: ## Download & build all the tools locally if necessary.
457457
# https://github.com/operator-framework/community-operators/blob/7f1438c/docs/packaging-operator.md#updating-your-existing-operator
458458
.PHONY: catalog-build
459459
catalog-build: opm ## Build a file-based catalog image.
460-
# Remove the catalog directory and Dockerfile
461-
-rm -r ${CATALOG_DIR} ${CATALOG_DOCKERFILE}
460+
# Remove the catalog directory and Dockerfile if they exist
461+
-rm -rf ${CATALOG_DIR} ${CATALOG_DOCKERFILE}
462462
@mkdir -p ${CATALOG_DIR}
463463
$(OPM) generate dockerfile ${CATALOG_DIR}
464464
$(OPM) init ${OPERATOR_NAME} \
@@ -472,7 +472,7 @@ catalog-build: opm ## Build a file-based catalog image.
472472
$(OPM) validate ${CATALOG_DIR}
473473
docker build . -f ${CATALOG_DOCKERFILE} -t ${CATALOG_IMG}
474474
# Clean up the catalog directory and Dockerfile
475-
rm -r ${CATALOG_DIR} ${CATALOG_DOCKERFILE}
475+
-rm -rf ${CATALOG_DIR} ${CATALOG_DOCKERFILE}
476476

477477
.PHONY: catalog-push
478478
catalog-push: ## Push a catalog image.

0 commit comments

Comments
 (0)