mirror of
https://github.com/cypress-io/cypress.git
synced 2026-04-26 17:08:10 -05:00
secure cookie error crash (#2685)
- fixes #1264 - fixes #1321 - fixes #1799 - fixes #2689 - fixes #2688 - fixes #2687 - fixes #2686
This commit is contained in:
@@ -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]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user