Skip to content

Commit

Permalink
Revert "adds backwards compatibility instead"
Browse files Browse the repository at this point in the history
This reverts commit bf1b5b7.
  • Loading branch information
a7ul committed May 9, 2021
1 parent 2d5e604 commit 79710e7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions index.mjs
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 79710e7

Please sign in to comment.