Skip to content

Commit

Permalink
chore: Log the errors when the project release configuration file is …
Browse files Browse the repository at this point in the history
…not valid. (#45)

chore: Add a log when the configuration file validation fails.
  • Loading branch information
M0nkeySan authored Oct 28, 2024
1 parent 57a808f commit 982760e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/release/utils/configBuilder.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { JSONSchemaType } from 'ajv';
import Ajv from 'ajv';
import ReleasePluginManager from '@/core/pluginManager/ReleasePluginManager';
import { logger } from '@/core/services/logger';
import type {
ProjectConfigurationsJSON,
ProjectReleaseConfig,
Expand Down Expand Up @@ -51,6 +52,7 @@ export async function buildProjectReleaseConfigs(
releaseTagManagers: Record<string, ReleaseTagManager>
) {
if (!validateProjectReleaseConfig(configs)) {
logger.error({errors : validateProjectReleaseConfig.errors}, 'The config file validation failed');
throw new Error(
'The config file should contain an array of valid project configurations'
);
Expand Down

0 comments on commit 982760e

Please sign in to comment.