From f355fead8a31fa0953d4734c7d844da934baa2a2 Mon Sep 17 00:00:00 2001 From: Pratham Patel Date: Thu, 27 Jul 2023 20:41:45 +0530 Subject: [PATCH] check before chowning --- create-image.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/create-image.sh b/create-image.sh index c49291d..7500096 100755 --- a/create-image.sh +++ b/create-image.sh @@ -22,4 +22,6 @@ appliance-creator \ 1> Rocky-9-aarch64-minimal.stdout.log \ 2> Rocky-9-aarch64-minimal.stderr.log -chown "${REAL_USER}:${REAL_USER}" "${APPLIANCE_NAME}*" +if [[ -f "${APPLIANCE_NAME}*" ]]; then + chown "${REAL_USER}:${REAL_USER}" "${APPLIANCE_NAME}*" +fi