From 7ef891c54e0e9b06efc09e0d5e328d900a31e958 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Sun, 5 Mar 2023 22:43:09 +0100 Subject: small cleanups and changes in comments I've made some code return early instead of adding more nesting, on top of this I've added some more comments in some files, rephrased a few things, and so on... --- src/modules/is_running.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/modules/is_running.js') diff --git a/src/modules/is_running.js b/src/modules/is_running.js index 5e0b67e..746df5c 100644 --- a/src/modules/is_running.js +++ b/src/modules/is_running.js @@ -15,7 +15,7 @@ async function check_processes(processes) { reject(false); } - // While we could use a Node module to do this instead, I + // while we could use a Node module to do this instead, I // decided not to do so. As this achieves exactly the same // thing. And it's not much more clunky. let cmd = (() => { @@ -28,12 +28,10 @@ async function check_processes(processes) { exec(cmd, (err, stdout) => { for (let i = 0; i < processes.length; i++) { if (stdout.includes(processes[i])) { - console.log("running") resolve(true); break } - console.log("not running") if (i == processes.length - 1) {resolve(false)} } }); -- cgit v1.2.3