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) {
1717 return utils . validateBstackJson ( bsConfigPath ) . then ( function ( bsConfig ) {
1818 utils . setUsageReportingFlag ( bsConfig , args . disableUsageReporting ) ;
1919
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 ) ;
2521
2622 // accept the username from command line or env variable if provided
2723 utils . setUsername ( bsConfig , args ) ;
Original file line number Diff line number Diff line change @@ -115,18 +115,14 @@ exports.setParallels = (bsConfig, args) => {
115115 }
116116} ;
117117
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 ) ) ) {
124121 bsConfig [ 'auth' ] = { } ;
125122 }
126- }
127123
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 ) ) {
130126 bsConfig . run_settings . npm_dependencies = { }
131127 }
132128}
You can’t perform that action at this time.
0 commit comments