aboutsummaryrefslogtreecommitdiff
path: root/src/modules/is_running.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2023-03-05 22:43:09 +0100
committer0neGal <mail@0negal.com>2023-03-05 22:43:09 +0100
commit7ef891c54e0e9b06efc09e0d5e328d900a31e958 (patch)
tree00cc2d7fe48dd558421f17a95002ad5d59a6e3f8 /src/modules/is_running.js
parentcf61a55b1e490befa976d4240593b535777caf69 (diff)
downloadViper-7ef891c54e0e9b06efc09e0d5e328d900a31e958.tar.gz
Viper-7ef891c54e0e9b06efc09e0d5e328d900a31e958.zip
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...
Diffstat (limited to 'src/modules/is_running.js')
-rw-r--r--src/modules/is_running.js4
1 files changed, 1 insertions, 3 deletions
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)}
}
});