Skip to content

Commit

Permalink
chore: changed config generation
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Oct 2, 2024
1 parent 4a29dc5 commit 6ac650a
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/helpers/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ export function validateAndDecodeSchemas(rawEnv: object, rawSettings: object) {
const env = Value.Default(envSchema, rawEnv) as Env;
if (!envValidator.test(env)) {
for (const error of envValidator.errors(env)) {
console.error(error);
errors.push(error);
}
}

const settings = Value.Default(pluginSettingsSchema, rawSettings) as PluginSettings;
if (!pluginSettingsValidator.test(settings)) {
for (const error of pluginSettingsValidator.errors(settings)) {
console.error(error);
errors.push(error);
}
}
Expand All @@ -31,7 +29,6 @@ export function validateAndDecodeSchemas(rawEnv: object, rawSettings: object) {
const decodedEnv = Value.Decode(envSchema, rawEnv || {});
return { decodedEnv, decodedSettings };
} catch (e) {
console.error("validateAndDecodeSchemas", e);
if (e instanceof TransformDecodeCheckError || e instanceof TransformDecodeError) {
throw { errors: [e.error] };
}
Expand Down

0 comments on commit 6ac650a

Please sign in to comment.