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