Completed
Push — master ( 55b531...a54cab )
by Thomas
01:26 queued 01:08
created

childprocess.js ➔ ... ➔ process.stderr.data   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
'use strict'
2
3
const output = require('./output')
4
const childProcess = require('child_process')
5
6
function runProcess (script) {
7
  var process = childProcess.exec(script)
8
  output.logComponent('Script', 'blue', 'Executing "' + script + '"')
9
  process.on('exit', function (code) {
10
    output.logComponent('Script', 'blue', 'Exited with code ' + code)
11
  })
12
  process.stderr.on('data', function (message) {
13
    output.logComponent('Script', 'blue', message)
14
  })
15
  process.stdout.on('data', function (message) {
16
    output.logComponent('Script', 'blue', message)
17
  })
18
}
19
20
module.exports = {
21
  run: runProcess
22
}
23