We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc199e5 commit 565a8e3Copy full SHA for 565a8e3
src/registry/index.sh
@@ -14,9 +14,15 @@ mush_registry_index_update()
14
15
if [ -f "${MUSH_REGISTRY_CACHE}" ]; then
16
while read -r line; do
17
- echo "Entry cache: ${line}"
+ #echo "Entry cache: ${line}"
18
[ -z "${line}" ] && continue
19
[ "${line:0:1}" = "#" ] && continue
20
+ local packages_file_url="$(echo "${line}" | awk '{print $1}')"
21
+ local packages_cache_hash="$(echo "${line}" | awk '{print $2}')"
22
+ local packages_hash="$(curl -I -s -L "${packages_file_url}" | grep -i ETag | awk '{print $2}' | tr -d '"')"
23
+ if [ "${packages_cache_hash}" != "${packages_hash}" ]; then
24
+ rm -fr "${MUSH_HOME}/registry/index" && true
25
+ fi
26
done < "${MUSH_REGISTRY_CACHE}"
27
fi
28
0 commit comments