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

lib/childprocess.js   A

Complexity

Total Complexity 4
Complexity/F 1

Size

Lines of Code 22
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
c 1
b 0
f 0
nc 1
dl 0
loc 22
rs 10
wmc 4
mnd 0
bc 4
fnc 4
bpm 1
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A childprocess.js ➔ runProcess 0 13 1
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