fix runCmd

This commit is contained in:
Subramanian Venkatesan 2018-09-10 14:16:02 +05:30
parent f20934ac8c
commit 78bc27ad95

View File

@ -131,7 +131,7 @@ function pingEndpoint(host, port, type, protocol, origin, callback) {
function runCmd(cmd, options, callback) {
const shelljs = require('shelljs');
options = Object.assign({silent: true, exitOnError: true}, options);
options = Object.assign({silent: true, exitOnError: true}, options || {});
let result = shelljs.exec(cmd);
if (result.code !== 0) {
console.log("error doing.. " + cmd);