mirror of
https://github.com/cypress-io/cypress.git
synced 2026-03-03 05:19:45 -06:00
Better handle reserved key CYPRESS_ENV being set by users to va… (#6437)
* Add warning when setting CYPRESS_ENV to non-production value * Add warning and update error when setting CYPRESS_ENV in config to non-production value * Update config test/to throw * we want warning, not throw * Rename env var to CYPRESS_INTERNAL_ENV + fix warning to actually warn when staging * update cli snapshot to include new 'info' command * yarn.lock * removed the warning from config, is overboard on our own tests 😓 * cleanup from review Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
This commit is contained in:
@@ -148,7 +148,7 @@ buildCypressApp = (platform, version, options = {}) ->
|
||||
})
|
||||
.then =>
|
||||
str = """
|
||||
process.env.CYPRESS_ENV = process.env.CYPRESS_ENV || 'production'
|
||||
process.env.CYPRESS_INTERNAL_ENV = process.env.CYPRESS_INTERNAL_ENV || 'production'
|
||||
require('./packages/server')
|
||||
"""
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ runProjectTest = (buildAppExecutable, e2e) ->
|
||||
console.log("running project test")
|
||||
|
||||
new Promise (resolve, reject) ->
|
||||
env = _.omit(process.env, "CYPRESS_ENV")
|
||||
env = _.omit(process.env, "CYPRESS_INTERNAL_ENV")
|
||||
|
||||
if !canRecordVideo()
|
||||
console.log("cannot record video on this platform yet, disabling")
|
||||
@@ -92,7 +92,7 @@ runFailingProjectTest = (buildAppExecutable, e2e) ->
|
||||
|
||||
spawn = ->
|
||||
new Promise (resolve, reject) ->
|
||||
env = _.omit(process.env, "CYPRESS_ENV")
|
||||
env = _.omit(process.env, "CYPRESS_INTERNAL_ENV")
|
||||
|
||||
args = [
|
||||
"--run-project=#{e2e}",
|
||||
|
||||
Reference in New Issue
Block a user