1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 17:51:15 +02: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

@ -88,12 +88,13 @@ struct SourceAccessor : std::enable_shared_from_this<SourceAccessor>
Unlike `DT_UNKNOWN`, this must not be used for deferring the lookup of types.
*/
tMisc
tChar, tBlock, tSocket, tFifo,
tUnknown
};
struct Stat
{
Type type = tMisc;
Type type = tUnknown;
/**
* For regular files only: the size of the file. Not all
@ -112,6 +113,9 @@ struct SourceAccessor : std::enable_shared_from_this<SourceAccessor>
* file in the NAR. Only returned by NAR accessors.
*/
std::optional<uint64_t> narOffset;
bool isNotNARSerialisable();
std::string typeString();
};
Stat lstat(const CanonPath & path);