1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-13 22:12:43 +01:00

nix flake: clarify error message when file is an unknown type

This commit is contained in:
Tristan Ross 2025-01-09 12:50:05 -08:00
parent 2d9b213cc2
commit 22adffec34
No known key found for this signature in database
GPG key ID: B09C422035669AF8
7 changed files with 59 additions and 13 deletions

View file

@ -291,7 +291,11 @@ json listNar(ref<SourceAccessor> accessor, const CanonPath & path, bool recurse)
obj["type"] = "symlink";
obj["target"] = accessor->readLink(path);
break;
case SourceAccessor::Type::tMisc:
case SourceAccessor::Type::tBlock:
case SourceAccessor::Type::tChar:
case SourceAccessor::Type::tSocket:
case SourceAccessor::Type::tFifo:
case SourceAccessor::Type::tUnknown:
assert(false); // cannot happen for NARs
}
return obj;