mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-05 22:19:46 -06:00
26 lines
576 B
JavaScript
26 lines
576 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 = ({ code }) => {
|
|
process.exit(code)
|
|
}
|
|
|
|
execa(pathToCli, args, { stdio: 'inherit' })
|
|
.then(exit)
|
|
.catch(exit)
|