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 jon4hz committed Nov 9, 2023
1 parent c837e33 commit 8ed3408
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 8ed3408

Please sign in to comment.