Skip zip file manipulation if the package is empty

Fixes https://github.com/sbt/sbt/issues/6497
This commit is contained in:
Eugene Yokota 2021-05-09 18:55:04 -04:00
parent aa24faff50
commit 25148899a1
1 changed files with 2 additions and 1 deletions

View File

@ -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