Skip to content

Commit

Permalink
check for bsConfig.run_settings.cypressProjectDir existance
Browse files Browse the repository at this point in the history
  • Loading branch information
suryart committed Oct 13, 2020
1 parent c6fea0c commit 1a6bc2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/helpers/usageReporting.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function local_cypress_version(bsConfig) {
// 1. check version of Cypress installed in local project
// 2. check version of Cypress installed globally if not present in project

if (bsConfig) {
if (bsConfig && bsConfig.run_settings.cypressProjectDir) {
let version = get_version(path.join(bsConfig.run_settings.cypressProjectDir, 'node_modules', '.bin', 'cypress'));
if (!version) {
version = get_version('cypress');
Expand Down Expand Up @@ -80,7 +80,7 @@ function cli_version_and_path(bsConfig) {
// 1. check version of Cypress installed in local project
// 2. check version of Cypress installed globally if not present in project

if (bsConfig) {
if (bsConfig && bsConfig.run_settings.cypressProjectDir) {
let _path = path.join(bsConfig.run_settings.cypressProjectDir, 'node_modules', 'browserstack-cypress');
let version = get_version(_path);
if (!version) {
Expand Down

0 comments on commit 1a6bc2c

Please sign in to comment.