mirror of
https://github.com/Jguer/yay.git
synced 2026-02-18 06:12:16 +01:00
Fixes #2759 The completion cache validation now checks if the file is empty and automatically regenerates it. This prevents shell completions from breaking when the cache file exists but is corrupted or empty. Previously, NeedsUpdate() only checked file existence and age, but didn't validate file contents. Empty cache files would be used as-is, causing 'yay -Pc' to return no output and breaking shell completions. Changes: - Add file size check in NeedsUpdate() to detect empty cache files - Add test case for empty file scenario - Update function documentation