| Total Complexity | 4 |
| Complexity/F | 1 |
| Lines of Code | 22 |
| Function Count | 4 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 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 |