Created
April 28, 2015 09:01
-
-
Save simbo/05ea4ade6437662087f8 to your computer and use it in GitHub Desktop.
[node] run shell commands without using an extra package.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var childProcess = require('child_process'); | |
var cwd = process.cwd(); | |
var childProcessOptions = { | |
stdio: 'inherit', | |
cwd: cwd | |
}; | |
childProcess.spawnSync('my-super-commandline-command', ['param1', 'param2'], childProcessOptions); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment