mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-14 03:00:21 -06:00
chore: exit with non-zero exit code on signal exit (#15727)
This commit is contained in:
@@ -136,12 +136,12 @@ module.exports = {
|
||||
}
|
||||
|
||||
return cp.spawn(execPath, argv, { stdio: 'inherit' })
|
||||
.on('close', (code, errCode) => {
|
||||
debug('electron closing %o', { code, errCode })
|
||||
.on('close', (code, signal) => {
|
||||
debug('electron closing %o', { code, signal })
|
||||
|
||||
if (code) {
|
||||
debug('original command was')
|
||||
debug(execPath, argv.join(' '))
|
||||
if (signal) {
|
||||
debug('electron exited with a signal, forcing code = 1 %o', { signal })
|
||||
code = 1
|
||||
}
|
||||
|
||||
if (cb) {
|
||||
|
||||
@@ -1158,6 +1158,7 @@ describe('e2e record', () => {
|
||||
spec: '*_record.spec*',
|
||||
group: 'foo',
|
||||
ciBuildId: 1,
|
||||
expectedExitCode: 1,
|
||||
record: true,
|
||||
snapshot: true,
|
||||
})
|
||||
@@ -1181,6 +1182,7 @@ describe('e2e record', () => {
|
||||
record: true,
|
||||
group: 'foo',
|
||||
ciBuildId: 'ciBuildId123',
|
||||
expectedExitCode: 1,
|
||||
parallel: true,
|
||||
snapshot: true,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user