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 // 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 const rootInputs = flakeLock.nodes['root'].inputs;
if (!(depName in (flakeLock.nodes['root'].inputs ?? []))) { if (!rootInputs || !(depName in rootInputs)) {
logger.debug( logger.debug(
{ packageLockFile, error: flakeLockParsed.error }, { packageLockFile, error: flakeLockParsed.error },
`invalid flake.lock file because cannot find "root" node`, `invalid flake.lock file because cannot find "root" node`,