🌈 An enterprise-class UI components based on Ant Design and Vue. 🐜
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
366 B

'use strict';
7 years ago
const getRunCmdEnv = require('./utils/getRunCmdEnv');
7 years ago
function runCmd(cmd, _args, fn) {
const args = _args || [];
7 years ago
const runner = require('child_process').spawn(cmd, args, {
// keep color
stdio: 'inherit',
env: getRunCmdEnv(),
});
7 years ago
runner.on('close', code => {
7 years ago
if (fn) {
fn(code);
7 years ago
}
});
7 years ago
}
module.exports = runCmd;