diff --git a/index.mjs b/index.mjs index a3a31e6852..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,11 +102,7 @@ export async function question(query, options) { output: process.stdout, completer, }) - let question = promisify(rl.question).bind(rl) - if (!rl.question[promisify.custom]) { - // Backwards compatibility for node < v15.8.0 - question = (q) => new Promise((resolve) => rl.question(q, resolve)) - } + const question = (q) => new Promise((resolve) => rl.question(q, resolve)); let answer = await question(query) rl.close() return answer