File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
packages/@vue/cli-plugin-e2e-cypress Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 1+ const path = require ( 'path' )
2+
13module . exports = ( api , options ) => {
24 const { info, chalk, execa, resolveModule } = require ( '@vue/cli-shared-utils' )
35
@@ -32,8 +34,16 @@ module.exports = (api, options) => {
3234 ]
3335
3436 // Use loadModule to allow users to customize their Cypress dependency version.
35- const cypressBinPath = resolveModule ( 'cypress/bin/cypress' , api . getCwd ( ) ) ||
36- resolveModule ( 'cypress/bin/cypress' , __dirname )
37+ const cypressPackageJsonPath =
38+ resolveModule ( 'cypress/package.json' , api . getCwd ( ) ) ||
39+ resolveModule ( 'cypress/package.json' , __dirname )
40+ const cypressPkg = require ( cypressPackageJsonPath )
41+ const cypressBinPath = path . resolve (
42+ cypressPackageJsonPath ,
43+ '../' ,
44+ cypressPkg . bin . cypress
45+ )
46+
3747 const runner = execa ( cypressBinPath , cyArgs , { stdio : 'inherit' } )
3848 if ( server ) {
3949 runner . on ( 'exit' , ( ) => server . close ( ) )
You can’t perform that action at this time.
0 commit comments