MCPcopy
hub / github.com/expressjs/generator / runRaw

Function runRaw

test/cmd.js:1172–1197  ·  view source on GitHub ↗
(dir, args, callback)

Source from the content-addressed store, hash-verified

1170}
1171
1172function runRaw (dir, args, callback) {
1173 var argv = [BIN_PATH].concat(args)
1174 var binp = process.argv[0]
1175 var stderr = ''
1176 var stdout = ''
1177
1178 var child = spawn(binp, argv, {
1179 cwd: dir
1180 })
1181
1182 child.stdout.setEncoding('utf8')
1183 child.stdout.on('data', function ondata (str) {
1184 stdout += str
1185 })
1186 child.stderr.setEncoding('utf8')
1187 child.stderr.on('data', function ondata (str) {
1188 stderr += str
1189 })
1190
1191 child.on('close', onclose)
1192 child.on('error', callback)
1193
1194 function onclose (code) {
1195 callback(null, code, stdout, stderr)
1196 }
1197}
1198
1199function setupTestEnvironment (name) {
1200 var ctx = {}

Callers 2

cmd.jsFile · 0.85
runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected