Skip to content

Commit 94c2fd1

Browse files
authored
Delete temp file "detect_linux_distribution_" on exit (#155)
Ensure temporary Linux distribution detection script is deleted on exit
1 parent 3034642 commit 94c2fd1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/io/zonky/test/db/postgres/util/LinuxUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ private static String resolveDistributionName() {
5656
try (InputStream source = LinuxUtils.class.getResourceAsStream("/sh/detect_linux_distribution.sh")) {
5757
target = Files.createTempFile("detect_linux_distribution_", ".sh");
5858
Files.copy(source, target, REPLACE_EXISTING);
59+
target.toFile().deleteOnExit();
5960
}
6061

6162
ProcessBuilder builder = new ProcessBuilder();

0 commit comments

Comments
 (0)