Skip to content

Commit d5e5dbc

Browse files
Adding Project Path in the error message.
1 parent a5f2cde commit d5e5dbc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

bin/helpers/capabilityHelper.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ const validate = (bsConfig) => {
9393

9494
if(!bsConfig.run_settings.cypress_proj_dir) reject(Constants.validationMessages.EMPTY_SPEC_FILES);
9595

96-
if (!fs.existsSync(path.join(process.cwd(), bsConfig.run_settings.cypress_proj_dir, 'cypress.json'))) reject(Constants.validationMessages.EMPTY_CYPRESS_JSON);
96+
var cypressProjectDir = path.join(process.cwd(), bsConfig.run_settings.cypress_proj_dir)
97+
if (!fs.existsSync(path.join(cypressProjectDir, 'cypress.json'))) reject(Constants.validationMessages.CYPRESS_JSON_NOT_FOUND + cypressProjectDir);
9798

9899
resolve(Constants.validationMessages.VALIDATED);
99100
});

bin/helpers/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const validationMessages = {
2424
NOT_VALID: "browerstack.json is not valid",
2525
NOT_VALID_JSON: "browerstack.json is not a valid json",
2626
INVALID_EXTENSION: "Invalid files, please remove these files and try again.",
27-
CYPRESS_JSON_NOT_FOUND: "cypress.json file is not found at cypress_proj_dir path"
27+
CYPRESS_JSON_NOT_FOUND: "cypress.json file is not found at cypress_proj_dir path "
2828
};
2929

3030
const cliMessages = {

0 commit comments

Comments
 (0)