From a6b33dc8d1d0b84e1f5dd070f684abc23d912a3a Mon Sep 17 00:00:00 2001 From: Sneed Group Date: Wed, 2 Oct 2024 17:19:39 -0500 Subject: [PATCH] no answer? hope this fixes it! --- index.mjs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/index.mjs b/index.mjs index 10eb2dd..576be31 100644 --- a/index.mjs +++ b/index.mjs @@ -22,16 +22,16 @@ const maxDepthCount = 11 let ags_modelfile; function ask(q) { - return new Promise((resolve) => { - const rl = readline.createInterface({ - input: process.stdin, - output: process.stdout, - }); - rl.question(q, a => { - rl.close(); - resolve(a); - }); + let ans = "" + const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout, }); + rl.question(q, a => { + ans = a; + rl.close(); + }); + return ans; } // Function to run the publishing commands