Skip to content

Commit

Permalink
Merge pull request #222 from HubSpot/refactor/loadAndValidateOptions3
Browse files Browse the repository at this point in the history
Add error case in deprecated config
  • Loading branch information
kemmerle authored Dec 18, 2024
2 parents fe9fc53 + 8de0de6 commit 861fdfd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config/config_DEPRECATED.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ export function validateConfig(): boolean {
logger.error('config.portals[] is not defined');
return false;
}

if (accounts.length === 0) {
logger.error('There are no accounts defined in the configuration file');
return false;
}

const accountIdsHash: { [id: number]: CLIAccount_DEPRECATED } = {};
const accountNamesHash: { [name: string]: CLIAccount_DEPRECATED } = {};

Expand Down

0 comments on commit 861fdfd

Please sign in to comment.