mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-06 06:29:45 -06:00
Fix internal driver tests exiting with wrong exitCode (#7078)
* use error.exitCode in cypress:run script * add log if code is NaN * expect exitCode in .then too
This commit is contained in:
@@ -16,8 +16,12 @@ debug('starting the CLI in dev mode with args %o', {
|
||||
args,
|
||||
})
|
||||
|
||||
const exit = ({ code }) => {
|
||||
process.exit(code)
|
||||
const exit = ({ exitCode }) => {
|
||||
if (typeof code !== 'number') {
|
||||
throw new Error(`missing exit code from execa (received ${exitCode})`)
|
||||
}
|
||||
|
||||
process.exit(exitCode)
|
||||
}
|
||||
|
||||
execa(pathToCli, args, { stdio: 'inherit' })
|
||||
|
||||
Reference in New Issue
Block a user