mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 10:58:28 +00:00
fix: guard against empty Version in configured-but-not-loaded package passthrough
PopulatePackages' "configured but not currently loaded" pass-through could still emit PackageVersion entries with a null/empty Version, reintroducing the schema issue the loaded-reflection branch's own guard already prevents (downstream parsers drop entries whose version isn't a string).
This commit is contained in:
parent
4631d3a537
commit
4a366a5a51
1 changed files with 5 additions and 2 deletions
|
|
@ -186,8 +186,11 @@ public class GetPackageManifestRequestHandler : WebApiBaseRequestHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configured but not currently loaded - pass through unchanged
|
// Configured but not currently loaded - pass through unchanged, but keep the same
|
||||||
mergedPackages.AddRange(configPackages.Where(p => !matchedConfigPackages.Contains(p)));
|
// "never emit an entry with no version" guarantee as the loaded-reflection branch above -
|
||||||
|
// otherwise this branch reintroduces the schema issue that guard is meant to prevent.
|
||||||
|
mergedPackages.AddRange(configPackages.Where(p =>
|
||||||
|
!matchedConfigPackages.Contains(p) && !string.IsNullOrEmpty(p.Version)));
|
||||||
|
|
||||||
result.Packages = mergedPackages;
|
result.Packages = mergedPackages;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue