cl: change logic to always download unless told via CYPRESS_DOWNLOAD env var

This commit is contained in:
Brian Mann
2017-06-05 18:06:45 -04:00
parent 2562f56c72
commit b2bad45cec
2 changed files with 6 additions and 5 deletions
+5 -4
View File
@@ -3,10 +3,11 @@ const minimist = require('minimist')
const args = minimist(process.argv.slice(2))
function installingFromNpmAsAUser () {
// when installing this CLI package from
// another project, the cwd will not match
// __dirname
return process.cwd() !== __dirname
// when installing from monorepo we explicitly
// opt out of downloading. if we aren't running
// from the root monorepo, then go ahead and
// download and install cypress binary
return process.env.CYPRESS_DOWNLOAD !== "0"
}
switch (args.exec) {