mirror of https://github.com/sbt/sbt.git
**Problem** When a file referenced during cache serialization is deleted between task execution and cache storage, sbt crashes with an uncaught NoSuchFileException. The IOException catch added in #8699 only wraps store.put(), but Converter.toJsonUnsafe(result) and mkInput() also call hashedVirtualFileRefToStr which calls Files.readAttributes — and these are outside the try-catch. **Solution** Move the try/catch IOException to wrap the entire post-action cache storage section, so NoSuchFileException from result serialization or cache key computation is caught and handled gracefully (skip caching, return result). Fixes #9044 Co-authored-by: bittoby <218712309+bittoby@users.noreply.github.co> |
||
|---|---|---|
| .. | ||
| main | ||
| test/scala | ||