Update Subprocess Handler

- Added param to return the script output instead of the exit code
- Reviewed uses of the function to make sure it would not intro problems
- Updated pdabHandler with the new param as it uses 'pcwd' as well
This commit is contained in:
Logan Cusano
2024-05-13 00:40:08 -04:00
parent 3950d57b7f
commit 7fb67f6ddf
2 changed files with 11 additions and 5 deletions

View File

@@ -22,7 +22,7 @@ let botCallback;
export const initDiscordBotClient = (clientId, callback, runPDAB = true) => {
botCallback = callback;
if (runPDAB) launchProcess("python", [join(__dirname, "./pdab/main.py"), process.env.AUDIO_DEVICE_ID, clientId, port], false, join(__dirname, "./pdab"));
if (runPDAB) launchProcess("python", [join(__dirname, "./pdab/main.py"), process.env.AUDIO_DEVICE_ID, clientId, port], false, false, join(__dirname, "./pdab"));
pdabProcess = true; // TODO - Make this more dynamic
}