secure cookie error crash (#2685)

- fixes #1264 
- fixes #1321 
- fixes #1799  
- fixes #2689
- fixes #2688
- fixes #2687 	
- fixes #2686
This commit is contained in:
Brian Mann
2018-11-01 12:34:37 -04:00
committed by GitHub
parent b6519258d2
commit 2333d04a54
245 changed files with 5045 additions and 2955 deletions
+4
View File
@@ -15,6 +15,7 @@ function getNameAndBinary (args = process.argv) {
'missing --binary option', options)
let npm = options.npm
if (fs.existsSync(options.npm)) {
console.log('loading NPM url from', options.npm)
npm = require(path.resolve(options.npm)).url
@@ -22,6 +23,7 @@ function getNameAndBinary (args = process.argv) {
}
let binary = options.binary
if (fs.existsSync(options.binary)) {
console.log('loading binary url from', options.binary)
binary = require(path.resolve(options.binary)).url
@@ -40,11 +42,13 @@ function getJustVersion (npmNameOrUrl) {
if (npmNameOrUrl.startsWith('cypress')) {
return npmNameOrUrl
}
if (is.url(npmNameOrUrl)) {
// try finding semver in the url
// https://something/0.20.3/something...
const re = /\/(\d+\.\d+\.\d+(-\w+)?)\//
const matches = re.exec(npmNameOrUrl)
if (matches) {
return matches[1]
}