blob: 24d56ab4583776283660ac9527262e3947fc7871 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
var util = require('util');
var spawn = require('child_process').spawn;
module.exports = function (command, options) {
var file, args;
if (process.platform === 'win32') {
file = 'cmd.exe';
args = ['/s', '/c', '"' + command + '"'];
options = util._extend({}, options);
options.windowsVerbatimArguments = true;
}
else {
file = '/bin/sh';
args = ['-c', command];
}
return spawn(file, args, options);
};
|