From 89c6c4b591707546240d146f5401decdc9c2e703 Mon Sep 17 00:00:00 2001 From: Markus Dobel Date: Mon, 27 Nov 2023 19:06:17 +0100 Subject: [PATCH] fix: remove duplicate mkdir --- action.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index c57ddb7..c03bcbc 100644 --- a/action.yml +++ b/action.yml @@ -111,8 +111,8 @@ runs: fi echo - # ensure mount path exists - mkdir -p "${BUILD_MOUNT_PATH}" + # ensure mount path exists before the action + sudo mkdir -p "${BUILD_MOUNT_PATH}" find "${BUILD_MOUNT_PATH}" -maxdepth 0 ! -empty -exec echo 'WARNING: directory [{}] is not empty, data loss might occur. Content:' \; -exec ls -al "{}" \; echo "Removing unwanted software... " @@ -179,9 +179,6 @@ runs: else sudo mkfs.ext4 -Enodiscard -m0 "/dev/mapper/${VG_NAME}-buildlv" fi - if [[ ! -d "${BUILD_MOUNT_PATH}" ]]; then - sudo mkdir -p "${BUILD_MOUNT_PATH}" - fi sudo mount "/dev/mapper/${VG_NAME}-buildlv" "${BUILD_MOUNT_PATH}" sudo chown -R "${{ inputs.build-mount-path-ownership }}" "${BUILD_MOUNT_PATH}"