Skip to content

Commit

Permalink
fix(databaseconfig): validate against valid database types
Browse files Browse the repository at this point in the history
  • Loading branch information
sgarouachi committed Jul 12, 2023
1 parent 3881732 commit 8a2e598
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/client/runner/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ export default abstract class Runner {
'Please provide the Credential Digger database configuration',
);
}
if (!Object.values(DbType).includes(this.config.databaseConfig.type)) {
throw new Error('Please provide a valid database type');
}
if (this.config.databaseConfig.type === DbType.SQLite) {
if (!this.config.databaseConfig.sqlite) {
throw new Error(
Expand Down

0 comments on commit 8a2e598

Please sign in to comment.