File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -390,17 +390,20 @@ exports.setSpecTimeout = (bsConfig, args) => {
390
390
logger . debug ( `Setting spec timeout = ${ specTimeout } ` ) ;
391
391
}
392
392
393
- exports . isValidTimezone = ( timezone ) => ! this . isUndefined ( timezone ) && ! this . isUndefined ( TIMEZONE [ timezone ] )
393
+ exports . isValidTimezone = ( timezone ) => this . isNotUndefined ( timezone ) && this . isNotUndefined ( TIMEZONE [ timezone ] )
394
394
395
395
exports . setTimezone = ( bsConfig , args ) => {
396
396
let timezone = args . timezone || bsConfig . run_settings . timezone ;
397
- if ( this . isUndefined ( timezone ) || ! this . isValidTimezone ( timezone ) ) {
397
+ let newTimezone ;
398
+ if ( this . isValidTimezone ( timezone ) ) {
399
+ newTimezone = timezone ;
400
+ } else {
398
401
logger . error ( `Invalid timezone = ${ timezone } ` ) ;
399
402
syncCliLogger . info ( chalk . red ( Constants . userMessages . INVALID_TIMEZONE ) ) ;
400
403
process . exit ( 1 ) ;
401
404
}
402
- bsConfig . run_settings . timezone = timezone ;
403
- logger . debug ( `Setting timezone = ${ timezone } ` ) ;
405
+ bsConfig . run_settings . timezone = newTimezone ;
406
+ logger . debug ( `Setting timezone = ${ newTimezone } ` ) ;
404
407
}
405
408
406
409
exports . setRecordFlag = ( bsConfig , args ) => {
You can’t perform that action at this time.
0 commit comments