mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-04 13:39:52 -06:00
* fix cypress.js script typo * add verify-mocha-results to driver integration test stages * add cypress-multi-reporters * fix circle.yml * fix yarn.lock * cleanup * use working_directory instead of yarn workspace commands * add reports to ui-components and reporter, update circle.yml * fix circle.yml * fix circle.yml * fix circle.yml * add more verify-mocha-results
32 lines
763 B
JavaScript
32 lines
763 B
JavaScript
const path = require('path')
|
|
const execa = require('execa')
|
|
const debug = require('debug')('cypress:scripts')
|
|
|
|
const args = process.argv.slice(2)
|
|
|
|
const pathToCli = path.resolve(__dirname, '..', 'cli', 'bin', 'cypress')
|
|
|
|
// always run the CLI in dev mode
|
|
// so it utilizes the development binary
|
|
// instead of the globally installed prebuilt one
|
|
args.push('--dev')
|
|
|
|
debug('starting the CLI in dev mode with args %o', {
|
|
command: pathToCli,
|
|
args,
|
|
})
|
|
|
|
const exit = ({ exitCode }) => {
|
|
if (typeof exitCode !== 'number') {
|
|
// eslint-disable-next-line no-console
|
|
console.error(`missing exit code from execa (received ${exitCode})`)
|
|
process.exit(1)
|
|
}
|
|
|
|
process.exit(exitCode)
|
|
}
|
|
|
|
execa(pathToCli, args, { stdio: 'inherit' })
|
|
.then(exit)
|
|
.catch(exit)
|