From 12a04c0037c793cf07889297eb7451e29a897ac9 Mon Sep 17 00:00:00 2001 From: Atul R Date: Sat, 8 May 2021 22:32:19 +0200 Subject: [PATCH] custom promisify implementation adds backwards compatibility instead removes ; Revert "adds backwards compatibility instead" This reverts commit bf1b5b7648c94d37dee3d539d9b365508b030274. --- index.mjs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.mjs b/index.mjs index 5090b94bf3..d5006c1267 100644 --- a/index.mjs +++ b/index.mjs @@ -14,7 +14,6 @@ import {existsSync} from 'fs' import {exec, execSync} from 'child_process' -import {promisify} from 'util' import {createInterface} from 'readline' import {default as nodeFetch} from 'node-fetch' import chalk from 'chalk' @@ -103,7 +102,7 @@ export async function question(query, options) { output: process.stdout, completer, }) - const question = promisify(rl.question).bind(rl) + const question = (q) => new Promise((resolve) => rl.question(q, resolve)); let answer = await question(query) rl.close() return answer