Skip to content

Commit 3cc7871

Browse files
committed
🐛 fix when timezone caps is not passed
1 parent 1847cf3 commit 3cc7871

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

bin/helpers/utils.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,12 +395,14 @@ exports.isValidTimezone = (timezone) => this.isNotUndefined(timezone) && this.is
395395
exports.setTimezone = (bsConfig, args) => {
396396
let timezone = args.timezone || bsConfig.run_settings.timezone;
397397
let newTimezone;
398-
if(this.isValidTimezone(timezone)){
399-
newTimezone = timezone;
400-
} else {
401-
logger.error(`Invalid timezone = ${timezone}`);
402-
syncCliLogger.info(chalk.red(Constants.userMessages.INVALID_TIMEZONE));
403-
process.exit(1);
398+
if(this.isNotUndefined(timezone)) {
399+
if(this.isValidTimezone(timezone)){
400+
newTimezone = timezone;
401+
} else {
402+
logger.error(`Invalid timezone = ${timezone}`);
403+
syncCliLogger.info(chalk.red(Constants.userMessages.INVALID_TIMEZONE));
404+
process.exit(1);
405+
}
404406
}
405407
bsConfig.run_settings.timezone = newTimezone;
406408
logger.debug(`Setting timezone = ${newTimezone}`);

0 commit comments

Comments
 (0)