mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-04 06:10:30 -06:00
* wip [skip ci] update * wip [skip ci] update test * [skip ci] fix env var * bump sinon, create helper utility to always throw when a stub is called without being given stubbed behavior * update failing specs * fix some error messages * update snapshot * warning -> note, add snapshot tests * change snapshot os.release, test env vars
31 lines
743 B
JavaScript
31 lines
743 B
JavaScript
const minimist = require('minimist')
|
|
const options = minimist(process.argv)
|
|
const la = require('lazy-ass')
|
|
const is = require('check-more-types')
|
|
const execa = require('execa')
|
|
const { getNameAndBinary } = require('./utils')
|
|
|
|
/* eslint-disable no-console */
|
|
|
|
const { npm, binary } = getNameAndBinary(process.argv)
|
|
la(is.unemptyString(npm), 'missing npm url')
|
|
la(is.unemptyString(binary), 'missing binary url')
|
|
|
|
console.log('testing NPM from', npm)
|
|
console.log('and binary from', binary)
|
|
const cwd = options.cwd || process.cwd()
|
|
console.log('in', cwd)
|
|
|
|
execa.shell(`npm install ${npm}`, {
|
|
cwd,
|
|
stdio: 'inherit',
|
|
env: {
|
|
CYPRESS_INSTALL_BINARY: binary,
|
|
},
|
|
})
|
|
.then(console.log)
|
|
.catch((e) => {
|
|
console.error(e)
|
|
process.exit(1)
|
|
})
|