Skip to content

Commit 2c1c17e

Browse files
author
Ganeshwara Hananda
committed
Get update.kt to include a trailing newline in the generated artifacts.snapshot
1 parent 5f2cf93 commit 2c1c17e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

library/maven/update.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package library.maven
22

3+
import java.lang.System.lineSeparator
34
import java.nio.file.Files
5+
import java.nio.file.Files.write
46
import java.nio.file.Paths
57

68
fun main() {
@@ -15,7 +17,7 @@ fun main() {
1517
val snapshotNew = snapshotUpdateProc.inputStream
1618
.use { inStr -> inStr.reader().readLines() }
1719
.toSortedSet()
18-
Files.write(snapshotFile, snapshotNew.joinToString(System.lineSeparator()).toByteArray())
20+
write(snapshotFile, (snapshotNew.joinToString(lineSeparator()) + lineSeparator()).toByteArray())
1921
if (snapshotUpdateProc.exitValue() != 0) {
2022
throw RuntimeException("'$snapshotCommand' failed with exit code '${snapshotUpdateProc.exitValue()}'")
2123
}

0 commit comments

Comments
 (0)