diff options
Diffstat (limited to 'general-util.js')
-rw-r--r-- | general-util.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/general-util.js b/general-util.js index 2ce7ed4..7156274 100644 --- a/general-util.js +++ b/general-util.js @@ -1,6 +1,10 @@ const { spawn } = require('child_process') +const { promisify } = require('util') +const fs = require('fs') const npmCommandExists = require('command-exists') +const readFile = promisify(fs.readFile) + module.exports.promisifyProcess = function(proc, showLogging = true) { // Takes a process (from the child_process module) and returns a promise // that resolves when the process exits (or rejects, if the exit code is |