From 25148899a17ef683f3c66a22a167120d95f7b6ac Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Sun, 9 May 2021 18:55:04 -0400 Subject: [PATCH] Skip zip file manipulation if the package is empty Fixes https://github.com/sbt/sbt/issues/6497 --- main/src/main/scala/sbt/internal/RemoteCache.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/src/main/scala/sbt/internal/RemoteCache.scala b/main/src/main/scala/sbt/internal/RemoteCache.scala index 6e46f607f..4c885551f 100644 --- a/main/src/main/scala/sbt/internal/RemoteCache.scala +++ b/main/src/main/scala/sbt/internal/RemoteCache.scala @@ -163,7 +163,8 @@ object RemoteCache { val artp = artifactPath.value val af = compileAnalysisFile.value IO.copyFile(original, artp) - if (af.exists) { + // skip zip manipulation if the artp is a blank file + if (af.exists && artp.length() > 0) { JarUtils.includeInJar(artp, Vector(af -> s"META-INF/inc_compile.zip")) } // val testStream = (test / streams).?.value