Fix ls error when no tar files exist in cache restore

Co-authored-by: awalsh128 <2087466+awalsh128@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-09-30 07:30:29 +00:00
parent f8ebd2808a
commit 91cfe593df

View file

@ -40,7 +40,7 @@ log "done"
log_empty_line
# Only search for archived results. Manifest and cache key also live here.
cached_filepaths=$(ls -1 "${cache_dir}"/*.tar | sort)
cached_filepaths=$(ls -1 "${cache_dir}"/*.tar 2>/dev/null | sort)
cached_filecount=$(echo ${cached_filepaths} | wc -w)
log "Restoring ${cached_filecount} packages from cache..."