[neko] added
This commit is contained in:
@@ -4,11 +4,13 @@ const colors = require('ansi-colors');
|
||||
const log = require('fancy-log');
|
||||
|
||||
const TAG = colors.green('[exec]');
|
||||
const verbose = process.argv.indexOf('--verbose') > -1;
|
||||
|
||||
const queue = async.queue((task, done) => {
|
||||
//log(TAG, colors.magenta(task.command));
|
||||
if (verbose) log(TAG, colors.magenta(task.command));
|
||||
//process.chdir(task.dir);
|
||||
child_process.exec(task.command, {cwd: task.dir, maxBuffer: 1024 * 5000}, (err, stdout, stderr) => {
|
||||
if (verbose) log(TAG, err ? colors.red(err) : '', stdout, colors.red(stderr));
|
||||
if (err) {
|
||||
task.failure(stderr || stdout || err);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user