Skip to content

Commit

Permalink
Merge pull request #523 from hygt/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
eed3si9n committed Mar 16, 2024
2 parents f2a9845 + 09b2817 commit 56f7e71
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/scala/sbtassembly/Assembly.scala
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,14 @@ object Assembly {
.getOrElse(System.currentTimeMillis())

timed(Level.Debug, "Create jar") {
IO.delete(output)
createJar(output, jarEntriesToWrite, jarManifest, localTime)
if (output.isDirectory) {
val invalidPath = output.toPath.toAbsolutePath.normalize
log.error(s"expected a file name for assemblyOutputPath, but found a directory: ${invalidPath}; fix the setting or delete the directory")
throw new RuntimeException("Exiting task")
} else {
IO.delete(output)
createJar(output, jarEntriesToWrite, jarManifest, localTime)
}
}
val fullSha1 = timed(Level.Debug, "Hash newly-built Jar") {
hash(output)
Expand Down

0 comments on commit 56f7e71

Please sign in to comment.