diff --git a/index.js b/index.js index 091a28f..3b54b0d 100644 --- a/index.js +++ b/index.js @@ -5,6 +5,9 @@ var program = require('commander'); var shell = require('shelljs'); var fs = require('fs-extra'); var chalk = require('chalk'); +var bash = require('child_process.exec'); + +var nginxReload = bash("nginx -t && service reload nginx"); // Requiring utils var validate = require('./util/validate'); @@ -75,7 +78,7 @@ program.on('--help', function () { program.parse(process.argv); try { - exec("nginx -t && service reload nginx"); + nginxReload(); } catch (e) {