We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae8d8fb commit ac9e789Copy full SHA for ac9e789
1 file changed
src/main/java/com/github/stickerifier/stickerify/process/ProcessHelper.java
@@ -34,9 +34,8 @@ public final class ProcessHelper {
34
*/
35
public static String executeCommand(final String... command) throws ProcessException, InterruptedException {
36
SEMAPHORE.acquire();
37
- try {
38
- var process = new ProcessBuilder(command).redirectErrorStream(true).start();
39
+ try (var process = new ProcessBuilder(command).redirectErrorStream(true).start()) {
40
var output = new StringJoiner("\n");
41
var readerThread = Thread.ofVirtual().start(() -> {
42
try (var reader = process.inputReader(UTF_8)) {
0 commit comments