Skip to content

Commit

Permalink
fix newFileSystem use non-existent URI
Browse files Browse the repository at this point in the history
  • Loading branch information
Roiocam committed Apr 29, 2024
1 parent 56f7e71 commit d9b70fa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/scala/sbtassembly/Assembly.scala
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ object Assembly {

/* Closeable resources */
private[sbtassembly] val jarFileSystemResource =
Using.resource((uri: URI) => FileSystems.newFileSystem(uri, Map("create" -> "true").asJava))
Using.resource((uri: URI) => FileSystems.newFileSystem(uri, Map.empty[String, String].asJava))
private[sbtassembly] val jarEntryInputStreamResource = Using.resource((entry: JarEntry) => entry.stream())
private[sbtassembly] val jarEntryOutputStreamResource = Using.resource((path: Path) =>
Files.newOutputStream(path, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.CREATE)
Expand Down Expand Up @@ -353,6 +353,10 @@ object Assembly {
throw new RuntimeException("Exiting task")
} else {
IO.delete(output)
val dest = output.getParentFile
if (!dest.exists()) {
dest.mkdirs()
}
createJar(output, jarEntriesToWrite, jarManifest, localTime)
}
}
Expand Down

0 comments on commit d9b70fa

Please sign in to comment.