Skip to content

Commit f497416

Browse files
committed
Allow absolute paths to be used
This partially fixes #736.
1 parent a295532 commit f497416

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/add-cucumber-preprocessor-plugin.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export async function beforeRunHandler(config: Cypress.PluginConfigOptions) {
6060
return;
6161
}
6262

63-
const messagesPath = path.join(
63+
const messagesPath = ensureIsAbsolute(
6464
config.projectRoot,
6565
preprocessor.messages.output
6666
);
@@ -75,12 +75,15 @@ export async function afterRunHandler(config: Cypress.PluginConfigOptions) {
7575
return;
7676
}
7777

78-
const messagesPath = path.join(
78+
const messagesPath = ensureIsAbsolute(
7979
config.projectRoot,
8080
preprocessor.messages.output
8181
);
8282

83-
const jsonPath = path.join(config.projectRoot, preprocessor.json.output);
83+
const jsonPath = ensureIsAbsolute(
84+
config.projectRoot,
85+
preprocessor.json.output
86+
);
8487

8588
try {
8689
await fs.access(messagesPath, fsConstants.F_OK);
@@ -132,7 +135,7 @@ export async function afterSpecHandler(
132135
) {
133136
const preprocessor = await resolve(config.projectRoot, config.env);
134137

135-
const messagesPath = path.join(
138+
const messagesPath = ensureIsAbsolute(
136139
config.projectRoot,
137140
preprocessor.messages.output
138141
);

0 commit comments

Comments
 (0)