Capturing output of remote exec() to file.

This commit is contained in:
2023-01-09 09:58:51 -05:00
parent 9ce06da271
commit 93b33ce37e
@@ -63,7 +63,17 @@ public class DevRequestHandler {
} }
processBuilder = new ProcessBuilder("/bin/sh", "-c", commandString + " " + commandArgument); processBuilder = new ProcessBuilder("/bin/sh", "-c", commandString + " " + commandArgument);
outFile = new File("devLastOut"); 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])); logString = String.join(" ",processBuilder.command().toArray(new String[0]));
try { try {