kibana-123
Version:
Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elastic
27 lines (21 loc) • 522 B
JavaScript
let { execFileSync } = require('child_process');
function exec(cmd, args, opts) {
console.log(' >', cmd, args.join(' '));
exec.silent(cmd, args, opts);
};
exec.silent = function (cmd, args, opts) {
opts = opts || {};
if (!opts.stdio) opts.stdio = ['ignore', 1, 2];
try {
execFileSync(cmd, args, opts);
} catch (e) {
if (opts.stdio[1] !== 1) {
console.log(e.stdout + '');
}
if (opts.stdio[2] !== 2) {
console.log(e.stderr + '');
}
throw e;
}
};
module.exports = exec;