瀏覽代碼

exception in prompts

pull/6/head
pb 3 年之前
父節點
當前提交
7ffb88dd35
共有 1 個文件被更改,包括 8 次插入3 次删除
  1. 8
    3
      cliverse.js

+ 8
- 3
cliverse.js 查看文件

@@ -107,9 +107,14 @@ var cli = {
const clii = readline.createInterface({ input: process.stdin, output: process.stdout });
return new Promise((resolve, reject)=>{
clii.question(q, (answer)=>{
clii.close();
console.log("resolve is being called");
resolve(answer)
try {
clii.close();
console.log("readline.createInterface closed");
resolve(answer)
}
catch(e) {
reject(e)
}
})
})
}

Loading…
取消
儲存