updater: async'ify
This commit is contained in:
@@ -30,11 +30,13 @@ function exec(tag, cmd, callback) {
|
||||
|
||||
child_process.exec(cmd, function (error, stdout, stderr) {
|
||||
const stdoutResult = stdout.toString('utf8');
|
||||
const stderrResult = stderr.toString('utf8');
|
||||
|
||||
debug(`${tag} (stdout): %s`, stdoutResult);
|
||||
debug(`${tag} (stderr): %s`, stderr.toString('utf8'));
|
||||
debug(`${tag} (stderr): %s`, stderrResult);
|
||||
|
||||
if (error) error.stdout = stdoutResult; // when promisified, this is the way to get stdout
|
||||
if (error) error.stderr = stderrResult; // when promisified, this is the way to get stderr
|
||||
|
||||
callback(error, stdoutResult);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user