From 8904fb882874aa47fb94e9113731d809cba1aaaa Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 9 Jan 2023 10:06:37 -0500 Subject: [PATCH] Removed file redirect; better to do that within the shell. --- src/discord/handlers/DevRequestHandler.java | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/discord/handlers/DevRequestHandler.java b/src/discord/handlers/DevRequestHandler.java index 492d448f..fbeff612 100644 --- a/src/discord/handlers/DevRequestHandler.java +++ b/src/discord/handlers/DevRequestHandler.java @@ -27,7 +27,6 @@ public class DevRequestHandler { String logString = ""; ProcessBuilder processBuilder; - File outFile; // Early exit if database unavailable or is not an admin @@ -63,22 +62,10 @@ public class DevRequestHandler { } processBuilder = new ProcessBuilder("/bin/sh", "-c", commandString + " " + commandArgument); - - outFile = new File("devLastOut"); - if (outFile.exists()) - outFile.delete(); - - try { - outFile.createNewFile(); - } catch (IOException e) { - throw new RuntimeException(e); - } - logString = String.join(" ",processBuilder.command().toArray(new String[0])); try { processBuilder.start(); - processBuilder.redirectOutput(outFile); } catch (IOException e) { Logger.info(e.toString()); }