From db65a5d9278775992954bf765bd23bcaa5bd4e4b Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 28 May 2025 18:38:23 +0100 Subject: tree.sh: add error check in check_project_hashes() when reading old_pjhash, we need to error out where a read error occurs. such an error is unlikely, but could occur under certain edge cases. Signed-off-by: Leah Rowe --- include/tree.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/tree.sh b/include/tree.sh index 7bfddf67..3e80c333 100644 --- a/include/tree.sh +++ b/include/tree.sh @@ -167,7 +167,8 @@ check_project_hashes() { old_pjhash="" && x_ mkdir -p "$XBMK_CACHE/hash" [ ! -f "$XBMK_CACHE/hash/$project$tree" ] || \ - read -r old_pjhash < "$XBMK_CACHE/hash/$project$tree" + read -r old_pjhash < "$XBMK_CACHE/hash/$project$tree" || \ + err "old_pjhash: Can't read '$XBMK_CACHE/hash/$project$tree'" fx_ "x_ sha512sum" find "$datadir" "$configdir/$tree" "$mdir" \ -type f -not -path "*/.git*/*" | awk '{print $1}' > \ -- cgit v1.2.1