Work around istanbul issue

This commit is contained in:
Sandro Jäckel 2024-11-27 23:44:40 +01:00
parent 96fd373ed8
commit 7eed106edf
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

View file

@ -41,8 +41,8 @@ export function extractPackageFile(
}
// skip all locked nodes which are not in the flake.nix and cannot be updated
// istanbul ignore next: a valid flake.lock file will never run into this
if (!(depName in (flakeLock.nodes['root'].inputs ?? []))) {
const rootInputs = flakeLock.nodes['root'].inputs;
if (!rootInputs || !(depName in rootInputs)) {
logger.debug(
{ packageLockFile, error: flakeLockParsed.error },
`invalid flake.lock file because cannot find "root" node`,