@@ -52,7 +52,7 @@ let currentTestStepStartedId: string;
5252let currentSpecMessages : messages . IEnvelope [ ] ;
5353
5454export async function beforeRunHandler ( config : Cypress . PluginConfigOptions ) {
55- const preprocessor = await resolve ( ) ;
55+ const preprocessor = await resolve ( config . projectRoot ) ;
5656
5757 if ( ! preprocessor . messages . enabled ) {
5858 return ;
@@ -67,7 +67,7 @@ export async function beforeRunHandler(config: Cypress.PluginConfigOptions) {
6767}
6868
6969export async function afterRunHandler ( config : Cypress . PluginConfigOptions ) {
70- const preprocessor = await resolve ( ) ;
70+ const preprocessor = await resolve ( config . projectRoot ) ;
7171
7272 if ( ! preprocessor . messages . enabled ) {
7373 return ;
@@ -128,7 +128,7 @@ export async function afterSpecHandler(
128128 spec : Cypress . Spec ,
129129 results : CypressCommandLine . RunResult
130130) {
131- const preprocessor = await resolve ( ) ;
131+ const preprocessor = await resolve ( config . projectRoot ) ;
132132
133133 const messagesPath = path . join (
134134 config . projectRoot ,
@@ -166,7 +166,7 @@ export async function afterScreenshotHandler(
166166 config : Cypress . PluginConfigOptions ,
167167 details : Cypress . ScreenshotDetails
168168) {
169- const preprocessor = await resolve ( ) ;
169+ const preprocessor = await resolve ( config . projectRoot ) ;
170170
171171 if ( ! preprocessor . messages . enabled || ! currentSpecMessages ) {
172172 return details ;
@@ -208,7 +208,7 @@ export default async function addCucumberPreprocessorPlugin(
208208 config : Cypress . PluginConfigOptions ,
209209 options : AddOptions = { }
210210) {
211- const preprocessor = await resolve ( ) ;
211+ const preprocessor = await resolve ( config . projectRoot ) ;
212212
213213 if ( ! options . omitBeforeRunHandler ) {
214214 on ( "before:run" , ( ) => beforeRunHandler ( config ) ) ;
0 commit comments