Add more debugging information when cache entry is missing

This would help with #73.
This commit is contained in:
Chris Down 2018-04-10 11:07:01 +01:00
parent 0b003d4ad2
commit d82337d226

View file

@ -59,7 +59,11 @@ file=$cache_dir/$(cksum <<< "$chosen_line")
if ! [[ -f "$file" ]]; then
# We didn't find this in cache
printf 'FATAL: %s not in cache\n' "$chosen_line" >&2
printf 'FATAL: %s not in cache (%s missing)\n' "$chosen_line" "$file" >&2
printf 'Please report the following debug information:\n\n' >&2
wc -l "$cache_file_prefix"_* >&2
grep -nFR "$chosen_line" "$cache_dir" >&2
stat "$file" >&2
exit 2
fi