fix windowsHide prop (#2853)

* Revert "Issue 21316 windows node11 (#2699) (fixes #2667)"

This reverts commit 54ce93b985.

* add windowsHide prop

* fix test name
This commit is contained in:
Ben Kucera
2018-12-02 21:03:52 -05:00
committed by Brian Mann
parent 742e0d3bba
commit d57ca55749
5 changed files with 36 additions and 52 deletions
+11 -2
View File
@@ -1,4 +1,5 @@
const _ = require('lodash')
const os = require('os')
const cp = require('child_process')
const path = require('path')
const Promise = require('bluebird')
@@ -12,12 +13,16 @@ const { throwFormErrorText, errors } = require('../errors')
const isXlibOrLibudevRe = /^(?:Xlib|libudev)/
const isHighSierraWarningRe = /\*\*\* WARNING/
function isPlatform (platform) {
return os.platform() === platform
}
function needsStderrPiped (needsXvfb) {
return util.isPlatform('darwin') || (needsXvfb && util.isPlatform('linux'))
return isPlatform('darwin') || (needsXvfb && isPlatform('linux'))
}
function needsEverythingPipedDirectly () {
return util.isPlatform('win32')
return isPlatform('win32')
}
function getStdio (needsXvfb) {
@@ -68,6 +73,7 @@ module.exports = {
}
const overrides = util.getEnvOverrides()
const node11WindowsFix = isPlatform('win32')
debug('spawning Cypress with executable: %s', executable)
debug('spawn forcing env overrides %o', overrides)
@@ -81,6 +87,9 @@ module.exports = {
// also figure out whether we should force stdout and stderr into thinking
// it is a tty as opposed to a pipe.
options.env = _.extend({}, options.env, overrides)
if (node11WindowsFix) {
options = _.extend({}, options, { windowsHide: false })
}
const child = cp.spawn(executable, args, options)