Skip to content

Commit f250d93

Browse files
authored
Merge pull request #111 from browserstack/fix_init_error
fix: handle null bsConfig for instrumentation in init command
2 parents 2a09083 + 4358eff commit f250d93

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

bin/helpers/usageReporting.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,11 @@ function send(args) {
174174

175175
let bsConfig = args.bstack_config;
176176
let cli_details = cli_version_and_path(bsConfig);
177-
let data = {
178-
cypress_version: bsConfig.run_settings.cypress_version
179-
};
177+
let data = {}
178+
179+
if (bsConfig && bsConfig.run_settings) {
180+
data.cypress_version = bsConfig.run_settings.cypress_version
181+
}
180182

181183
delete args.bstack_config;
182184

0 commit comments

Comments
 (0)