We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1aeacb0 commit 31c69c7Copy full SHA for 31c69c7
1 file changed
bin/sdk/images/prepopulate-composer-cache.sh
@@ -13,13 +13,13 @@ fi
13
14
COMPOSER_CACHE_DIR=$(composer config cache-dir)
15
16
-echo "Pre-populating Docker BuildKit cache from ${COMPOSER_CACHE_DIR}"
17
-
18
-if [ ! -d "${COMPOSER_CACHE_DIR}" ]; then
19
- echo "Warning: Composer cache directory ${COMPOSER_CACHE_DIR} does not exist. Skipping pre-population."
+if [ -z "$(ls -A "${COMPOSER_CACHE_DIR}" 2>/dev/null | grep -v '^\.htaccess$')" ]; then
+ echo "Warning: Composer cache directory ${COMPOSER_CACHE_DIR} is empty (excluding .htaccess). Skipping pre-population."
20
exit 0
21
fi
22
+echo "Pre-populating Docker BuildKit cache from ${COMPOSER_CACHE_DIR}"
+
23
# Create a temporary directory for the build context
24
TEMP_CONTEXT=$(mktemp -d)
25
trap "rm -rf ${TEMP_CONTEXT}" EXIT
0 commit comments