Explicitly spawn program via shell.

So example continues to work.
This commit is contained in:
Mark Stemm 2017-06-14 15:26:17 -07:00
parent 6ebbbd47d8
commit 646aed5b8b

View File

@ -14,7 +14,7 @@ router.get('/', function(req, res) {
});
router.get('/exec/:cmd', function(req, res) {
var ret = child_process.spawnSync(req.params.cmd);
var ret = child_process.spawnSync(req.params.cmd, { shell: true});
res.send(ret.stdout);
});