mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 23:16:26 +00:00
fix(gradle): Avoid crash for missing managerData (#11727)
This commit is contained in:
parent
45d1aeecc3
commit
522d23e2c5
1 changed files with 19 additions and 14 deletions
|
@ -98,7 +98,9 @@ export async function extractAllPackageFiles(
|
|||
}
|
||||
|
||||
elevateFileReplacePositionField(extractedDeps).forEach((dep) => {
|
||||
const key = dep.managerData.packageFile;
|
||||
const key = dep.managerData?.packageFile;
|
||||
// istanbul ignore else
|
||||
if (key) {
|
||||
const pkgFile: PackageFile = packageFilesByName[key];
|
||||
const { deps } = pkgFile;
|
||||
deps.push({
|
||||
|
@ -112,6 +114,9 @@ export async function extractAllPackageFiles(
|
|||
],
|
||||
});
|
||||
packageFilesByName[key] = pkgFile;
|
||||
} else {
|
||||
logger.warn({ dep }, `Failed to process Gradle dependency`);
|
||||
}
|
||||
});
|
||||
|
||||
return Object.values(packageFilesByName);
|
||||
|
|
Loading…
Reference in a new issue