File tree Expand file tree Collapse file tree 2 files changed +6
-14
lines changed Expand file tree Collapse file tree 2 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,7 @@ module.exports = function run(args) {
17
17
return utils . validateBstackJson ( bsConfigPath ) . then ( function ( bsConfig ) {
18
18
utils . setUsageReportingFlag ( bsConfig , args . disableUsageReporting ) ;
19
19
20
- // setting setDefaultAuthHash to {} if not present and set via env variables or via args.
21
- utils . setDefaultAuthHash ( bsConfig , args ) ;
22
-
23
- // setting npm_dependencies to {} if not present
24
- utils . setDefaultNpmHash ( bsConfig ) ;
20
+ utils . setDefaults ( bsConfig , args ) ;
25
21
26
22
// accept the username from command line or env variable if provided
27
23
utils . setUsername ( bsConfig , args ) ;
Original file line number Diff line number Diff line change @@ -115,18 +115,14 @@ exports.setParallels = (bsConfig, args) => {
115
115
}
116
116
} ;
117
117
118
- exports . setDefaultAuthHash = ( bsConfig , args ) => {
119
- if (
120
- this . isUndefined ( bsConfig [ 'auth' ] ) &&
121
- ( ! this . isUndefined ( args . username ) ||
122
- ! this . isUndefined ( process . env . BROWSERSTACK_USERNAME ) )
123
- ) {
118
+ exports . setDefaults = ( bsConfig , args ) => {
119
+ // setting setDefaultAuthHash to {} if not present and set via env variables or via args.
120
+ if ( this . isUndefined ( bsConfig [ 'auth' ] ) && ( ! this . isUndefined ( args . username ) || ! this . isUndefined ( process . env . BROWSERSTACK_USERNAME ) ) ) {
124
121
bsConfig [ 'auth' ] = { } ;
125
122
}
126
- }
127
123
128
- exports . setDefaultNpmHash = ( bsConfig ) => {
129
- if ( bsConfig . run_settings && ! bsConfig . run_settings . npm_dependencies ) {
124
+ // setting npm_dependencies to {} if not present
125
+ if ( bsConfig . run_settings && this . isUndefined ( bsConfig . run_settings . npm_dependencies ) ) {
130
126
bsConfig . run_settings . npm_dependencies = { }
131
127
}
132
128
}
You can’t perform that action at this time.
0 commit comments