mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-04 22:10:40 -05:00
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:
+11
-2
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user