Skip to content

Commit

Permalink
fix(yarn): Don't parse empty yarnrc files (renovatebot#25609)
Browse files Browse the repository at this point in the history
  • Loading branch information
zharinov authored and pull[bot] committed Feb 19, 2024
1 parent af94116 commit 71c60c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/modules/manager/npm/extract/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ export async function extractPackageFile(

let yarnConfig: YarnConfig | null = null;
const repoYarnrcYml = await readLocalFile(yarnrcYmlFileName, 'utf8');
if (is.string(repoYarnrcYml)) {
if (is.string(repoYarnrcYml) && repoYarnrcYml.trim().length > 0) {
yarnConfig = loadConfigFromYarnrcYml(repoYarnrcYml);
}

const legacyYarnrcFileName = getSiblingFileName(packageFile, '.yarnrc');
const repoLegacyYarnrc = await readLocalFile(legacyYarnrcFileName, 'utf8');
if (is.string(repoLegacyYarnrc)) {
if (is.string(repoLegacyYarnrc) && repoLegacyYarnrc.trim().length > 0) {
yarnConfig = loadConfigFromLegacyYarnrc(repoLegacyYarnrc);
}

Expand Down

0 comments on commit 71c60c5

Please sign in to comment.