Skip to content

Commit

Permalink
use util parseJson fn
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel-Ladzaretti committed Dec 31, 2024
1 parent a60841d commit aacf6f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/workers/global/config/parse/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import JSON5 from 'json5';
import { getOptions } from '../../../../config/options';
import type { AllConfig } from '../../../../config/types';
import { logger } from '../../../../logger';
import { parseJson } from '../../../../util/common';
import { coersions } from './coersions';
import type { ParseConfigOptions } from './types';
import { migrateAndValidateConfig } from './util';
Expand Down Expand Up @@ -243,7 +244,7 @@ async function parseAndValidateOrExit(
}

try {
const config = JSON5.parse(env[configEnvKey]);
const config = parseJson(env[configEnvKey], '.json5') as AllConfig;
logger.debug({ config }, `Detected config in env ${configEnvKey}`);

return await migrateAndValidateConfig(config, `${configEnvKey}`);
Expand Down

0 comments on commit aacf6f7

Please sign in to comment.