Open tohjustin opened 4 years ago
Yeah, this message is harmless, but nonetheless confusing in this context. We shouldn't show this message when we know we are running our own smoke test.
Okay, thanks for clarifying this! 🙏
I tried this command after the error.
npx cypress open
Cypress opened successfully
While trying to debug an issue w/
cypress verify
getting stuck occasionally (related #6082), I'm getting the following stdout message from runningcypress verify
in debug mode (viaDEBUG=cypress:* yarn cypress verify
)Is this is an expected output from the smoke-test?
Current behavior:
Desired behavior:
I did a little digging myself & here what I've found:
options.invokedFromCli === false
https://github.com/cypress-io/cypress/blob/v3.8.1/packages/server/lib/cypress.coffee#L59options.invokedFromCli
is computed based off theoptions.cwd
value https://github.com/cypress-io/cypress/blob/v3.8.1/packages/server/lib/util/args.js#L172options.cwd
is inherited from the--cwd
flag, which is injected here https://github.com/cypress-io/cypress/blob/v3.8.1/cli/lib/exec/spawn.js#L84Based on the findings above, I "believe" this is what's happening under the hood:
runSmokeTest()
https://github.com/cypress-io/cypress/blob/v3.8.1/cli/lib/tasks/verify.js#L43runSmokeTest()
starts the test by exec'ing the Cypress binary & spawns a child process https://github.com/cypress-io/cypress/blob/v3.8.1/cli/lib/tasks/verify.js#L113--cwd flag
isn't injectedHence the Cypress child-process (spawn'ed from cypress verify) determines that it wasn't being launched directly from the CLI & prints out the message
(From what I've seen so far, seems like this is the intended behaviour & it's harmless since the verify task succeeded.)
Steps to reproduce:
DEBUG=cypress:* npx cypress@latest verify
(getting the same output if one were to runDEBUG=cypress:* yarn cypress verify
in their project directory)Versions
Node@LTS (v12.14.0) Cypress@latest (v3.8.1) macOS High Sierra (v10.13.6)