File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/@vue/cli/lib/util Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -267,10 +267,12 @@ class PackageManager {
267
267
// Do not override user-defined env variable
268
268
// Because we may construct a wrong download url and an escape hatch is necessary
269
269
if ( targetPlatform && ! process . env . CYPRESS_INSTALL_BINARY ) {
270
- // We only support cypress 3 for the current major version
271
- const latestCypressVersion = await this . getRemoteVersion ( 'cypress' , '^3' )
272
- process . env . CYPRESS_INSTALL_BINARY =
273
- `${ cypressMirror . host } /${ latestCypressVersion } /${ targetPlatform } /cypress.zip`
270
+ const projectPkg = resolvePkg ( this . context )
271
+ if ( projectPkg && projectPkg . devDependencies && projectPkg . devDependencies . cypress ) {
272
+ const wantedCypressVersion = await this . getRemoteVersion ( 'cypress' , projectPkg . devDependencies . cypress )
273
+ process . env . CYPRESS_INSTALL_BINARY =
274
+ `${ cypressMirror . host } /${ wantedCypressVersion } /${ targetPlatform } /cypress.zip`
275
+ }
274
276
}
275
277
} catch ( e ) {
276
278
// get binary mirror config failed
You can’t perform that action at this time.
0 commit comments