Skip to content

Commit

Permalink
custom promisify implementation (#37)
Browse files Browse the repository at this point in the history
adds backwards compatibility instead

removes ;

Revert "adds backwards compatibility instead"

This reverts commit bf1b5b7.
  • Loading branch information
a7ul committed May 9, 2021
1 parent d6789d1 commit bf94e38
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 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,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
Expand Down

0 comments on commit bf94e38

Please sign in to comment.