@open-wa/wa-automate 4.36.1 → 4.36.2
Sign up to get free protection for your applications and to get access to all the features.
- package/bin/server.js +4 -1
- package/package.json +1 -1
package/bin/server.js
CHANGED
@@ -15,7 +15,10 @@ async function start() {
|
|
15
15
|
pm2.on('error', reject);
|
16
16
|
pm2.stdout.on('data', () => resolve(true));
|
17
17
|
})
|
18
|
-
const
|
18
|
+
const stringedArgs = (getVal(pm2Index) || "").match(/"[^"]*"/g);
|
19
|
+
let pm2ArgString = (getVal(pm2Index) || "");
|
20
|
+
if(stringedArgs) stringedArgs.map(stringedArg => pm2ArgString = pm2ArgString.replace(stringedArg, stringedArg.replaceAll(" ","|~|")))
|
21
|
+
const pm2Flags = pm2ArgString.split(" ").map(r=>r.replaceAll("|~|"," ")).flatMap(r=>r.split("=")).map(r=>r.replaceAll('"',"")).filter(x=>x);
|
19
22
|
const cliFlags = (process.argv.slice(2) || []);
|
20
23
|
spawn("pm2", [
|
21
24
|
"start",
|
package/package.json
CHANGED