Skip to content

Commit

Permalink
Delete argfile on JVM exit
Browse files Browse the repository at this point in the history
Closes gh-42841
  • Loading branch information
mhalbritter committed Oct 23, 2024
1 parent e4adc7d commit 9cced06
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,9 @@ private String escape(CharSequence content) {
}

static ArgFile create(CharSequence content) throws IOException {
ArgFile argFile = new ArgFile(Files.createTempFile("spring-boot-", ".argfile"));
Path tempFile = Files.createTempFile("spring-boot-", ".argfile");
tempFile.toFile().deleteOnExit();
ArgFile argFile = new ArgFile(tempFile);
argFile.write(content);
return argFile;
}
Expand Down

0 comments on commit 9cced06

Please sign in to comment.