Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
  • Loading branch information
Gabriel-Ladzaretti and viceice committed Aug 16, 2022
1 parent c5eb47d commit f17dc80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/workers/repository/init/merge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export async function detectRepoFileConfig(): Promise<RepoFileConfig> {
logger.debug(`Found ${configFileName} config file`);
// TODO #7154
let configFileParsed: any;
let configFileRaw: string | undefined;
let configFileRaw: string | undefined | null;
if (configFileName === 'package.json') {
// We already know it parses
configFileParsed = JSON.parse(
Expand All @@ -83,7 +83,7 @@ export async function detectRepoFileConfig(): Promise<RepoFileConfig> {
}
logger.debug({ config: configFileParsed }, 'package.json>renovate config');
} else {
configFileRaw = (await readLocalFile(configFileName, 'utf8')) ?? undefined;
configFileRaw = (await readLocalFile(configFileName, 'utf8'));
// istanbul ignore if
if (!is.string(configFileRaw)) {
logger.warn({ configFileName }, 'Null contents when reading config file');
Expand Down

0 comments on commit f17dc80

Please sign in to comment.