Removing blob file protection during build cleanup.
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Controller Tests / controller-tests (push) Has been cancelled
Jest Tests / jest-tests (push) Has been cancelled

This commit is contained in:
Roland 2026-02-16 08:14:44 -07:00
parent adb8fefd67
commit b8d3b5318b
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
2 changed files with 5 additions and 0 deletions

View file

@ -44,6 +44,8 @@ else
fi
# Clear out old builds.
# Remove immutable attribute from protected files before cleanup
chattr -i "${BUILD_DIR}"/chroot/opt/wrolpi-blobs/* 2>/dev/null || :
[ -d "${BUILD_DIR}" ] && rm -rf "${BUILD_DIR}"
mkdir "${BUILD_DIR}"
cd "${BUILD_DIR}" || (echo "Work directory must exist" && exit 1)

View file

@ -62,6 +62,9 @@ cleanup() {
fi
done
# Remove immutable attribute from protected files before cleanup
chattr -i "${BUILD_DIR}"/work/*/stage*/rootfs/opt/wrolpi-blobs/* 2>/dev/null || :
# Final safety net – remove the whole build tree
rm -rf "${BUILD_DIR}"
}