stream_layered_image: Clarify assertion failure
This commit is contained in:
parent
87a538e149
commit
fe71abfc12
@ -146,7 +146,9 @@ def add_layer_dir(tar, paths, mtime, add_nix=True, filter=None):
|
|||||||
the layer added.
|
the layer added.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
assert all(i.startswith("/nix/store/") for i in paths)
|
invalid_paths = [i for i in paths if not i.startswith("/nix/store/")]
|
||||||
|
assert len(invalid_paths) == 0, \
|
||||||
|
"Expecting absolute store paths, but got: {invalid_paths}"
|
||||||
|
|
||||||
# First, calculate the tarball checksum and the size.
|
# First, calculate the tarball checksum and the size.
|
||||||
extract_checksum = ExtractChecksum()
|
extract_checksum = ExtractChecksum()
|
||||||
|
Loading…
Reference in New Issue
Block a user