Skip to content

Commit

Permalink
Merge pull request #248 from draios/fix-nodejs-example
Browse files Browse the repository at this point in the history
Explicitly spawn program via shell.
  • Loading branch information
mstemm committed Jun 14, 2017
2 parents 6bfff60 + 646aed5 commit 87caa55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/nodejs-bad-rest-api/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down

0 comments on commit 87caa55

Please sign in to comment.