mirror of
https://github.com/cypress-io/cypress.git
synced 2026-04-22 23:20:24 -05:00
@@ -1,6 +1,7 @@
|
||||
const _ = require('lodash')
|
||||
const cp = require('child_process')
|
||||
const Promise = require('bluebird')
|
||||
const devNull = require('dev-null')
|
||||
const debug = require('debug')('cypress:cli')
|
||||
|
||||
const info = require('../tasks/info')
|
||||
@@ -13,7 +14,7 @@ module.exports = {
|
||||
|
||||
_.defaults(options, {
|
||||
detached: false,
|
||||
stdio: [process.stdin, process.stdout, 'ignore'],
|
||||
stdio: ['inherit', 'pipe', 'pipe'],
|
||||
})
|
||||
|
||||
const spawn = () => {
|
||||
@@ -26,6 +27,9 @@ module.exports = {
|
||||
child.on('close', resolve)
|
||||
child.on('error', reject)
|
||||
|
||||
child.stdout.pipe(process.stdout)
|
||||
child.stderr.pipe(devNull())
|
||||
|
||||
if (options.detached) {
|
||||
child.unref()
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
"commander": "2.9.0",
|
||||
"common-tags": "1.4.0",
|
||||
"debug": "2.6.8",
|
||||
"dev-null": "0.1.1",
|
||||
"extract-zip": "1.6.5",
|
||||
"fs-extra": "4.0.1",
|
||||
"getos": "2.8.4",
|
||||
|
||||
@@ -12,6 +12,12 @@ describe('exec spawn', function () {
|
||||
this.spawnedProcess = this.sandbox.stub({
|
||||
on: () => {},
|
||||
unref: () => {},
|
||||
stdout: {
|
||||
pipe: () => {},
|
||||
},
|
||||
stderr: {
|
||||
pipe: () => {},
|
||||
},
|
||||
})
|
||||
this.sandbox.stub(cp, 'spawn').returns(this.spawnedProcess)
|
||||
this.sandbox.stub(xvfb, 'start').resolves()
|
||||
|
||||
Reference in New Issue
Block a user