Skip to content

Commit

Permalink
fix: remove duplicate mkdir
Browse files Browse the repository at this point in the history
  • Loading branch information
easimon committed Nov 27, 2023
1 parent 69e8e45 commit 89c6c4b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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... "
Expand Down Expand Up @@ -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}"
Expand Down

0 comments on commit 89c6c4b

Please sign in to comment.