1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-19 08:49:35 +01:00

libutil: Throw if str("contents") not found

This was broken in 7aa3e7e3a5 (since 2.25).

(cherry picked from commit 242f362567)
This commit is contained in:
Samuel Connelly 2025-10-03 18:41:01 -04:00 committed by github-actions[bot]
parent 80f2ca4015
commit 7a05ed9c12
4 changed files with 52 additions and 2 deletions

View file

@ -187,8 +187,10 @@ static void parse(FileSystemObjectSink & sink, Source & source, const CanonPath
tag = getString();
}
if (tag == "contents")
parseContents(crf, source);
if (tag != "contents")
throw badArchive("expected tag 'contents', got '%s'", tag);
parseContents(crf, source);
expectTag(")");
});