mirror of
https://github.com/cypress-io/cypress.git
synced 2026-04-30 12:01:06 -05:00
only connect to socket if path has been replaced, fixes #4776
This commit is contained in:
@@ -4,6 +4,7 @@ once = require("lodash/once")
|
||||
Promise = require("bluebird")
|
||||
{ client, circularParser } = require("@packages/socket/lib/browser")
|
||||
|
||||
HOST_PATH_REPLACED = false
|
||||
HOST = "CHANGE_ME_HOST"
|
||||
PATH = "CHANGE_ME_PATH"
|
||||
|
||||
@@ -70,7 +71,8 @@ connect = (host, path) ->
|
||||
return ws
|
||||
|
||||
## initially connect
|
||||
connect(HOST, PATH)
|
||||
if HOST_PATH_REPLACED
|
||||
connect(HOST, PATH)
|
||||
|
||||
automation = {
|
||||
connect
|
||||
|
||||
@@ -23,6 +23,7 @@ module.exports = {
|
||||
fs.readFileAsync(src, "utf8")
|
||||
.then (str) ->
|
||||
str
|
||||
.replace("HOST_PATH_REPLACED = false", "HOST_PATH_REPLACED = true")
|
||||
.replace("CHANGE_ME_HOST", host)
|
||||
.replace("CHANGE_ME_PATH", path)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user