Skip to content

Do not exit with 0 when running with NODE_OPTIONS #1676

@bahmutov

Description

@bahmutov

bug

When using NODE_OPTIONS=--max_old_space_size=4096 Cypress run through CLI silently fails but the exit code is 0.

  • why is this option affecting the run?
  • why don't we exit with 1?
  • why don't we print the problem?
$ NODE_OPTIONS=--max_old_space_size=4096 DEBUG=cypress:* npm run cypress:open

> [email protected] cypress:open /Users/gleb/git/cypress-test-tiny
> cypress open

  cypress:cli cli starts with arguments ["/Users/gleb/.nvm/versions/node/v8.9.4/bin/node","/Users/gleb/git/cypress-test-tiny/node_modules/.bin/cypress","open"] +0ms
  cypress:cli program parsing arguments +3ms
  cypress:cli opening Cypress +1ms
  cypress:cli parsed cli options {} +129ms
  cypress:cli opening from options {"project":"/Users/gleb/git/cypress-test-tiny"} +0ms
  cypress:cli command line arguments ["--project","/Users/gleb/git/cypress-test-tiny"] +1ms
  cypress:cli verifying Cypress app +0ms
  cypress:cli path to info.json file /Users/gleb/git/cypress-test-tiny/node_modules/cypress/dist/info.json +0ms
  cypress:cli { version: '2.1.0', verifiedVersion: '2.1.0' } +16ms
  cypress:cli installed version is 2.1.0 comparing to 2.1.0 +17ms
  cypress:cli checking if executable exists /Users/gleb/git/cypress-test-tiny/node_modules/cypress/dist/Cypress.app/Contents/MacOS/Cypress +0ms
  cypress:cli path to info.json file /Users/gleb/git/cypress-test-tiny/node_modules/cypress/dist/info.json +2ms
  cypress:cli has verified version 2.1.0 +2ms
  cypress:cli run verification check? false +0ms
  cypress:cli needs XVFB? false +0ms
  cypress:cli spawning Cypress /Users/gleb/git/cypress-test-tiny/node_modules/cypress/dist/Cypress.app/Contents/MacOS/Cypress +0ms
  cypress:cli spawn args ["--project","/Users/gleb/git/cypress-test-tiny","--cwd","/Users/gleb/git/cypress-test-tiny"] { dev: undefined, detached: false, stdio: 'inherit' } +0ms
~/git/cypress-test-tiny on master
$ echo $?
0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions