aboutsummaryrefslogtreecommitdiff
path: root/pkgs/build-support/docker
diff options
context:
space:
mode:
authorUtku Demir <me@utdemir.com>2020-06-21 12:18:28 +1200
committerUtku Demir <me@utdemir.com>2020-06-21 12:35:39 +1200
commitfe71abfc12ede6700f599a08c7528fe66461486f (patch)
treec1f344a8b2fb30c1cfa9427fdcb87759acf4d0e8 /pkgs/build-support/docker
parent87a538e149cbf41361afda3b417eac1632f00c5b (diff)
stream_layered_image: Clarify assertion failure
Diffstat (limited to 'pkgs/build-support/docker')
-rw-r--r--pkgs/build-support/docker/stream_layered_image.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/build-support/docker/stream_layered_image.py b/pkgs/build-support/docker/stream_layered_image.py
index bbad5f5023c4..5d251e8bfb05 100644
--- a/pkgs/build-support/docker/stream_layered_image.py
+++ b/pkgs/build-support/docker/stream_layered_image.py
@@ -146,7 +146,9 @@ def add_layer_dir(tar, paths, mtime, add_nix=True, filter=None):
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.
extract_checksum = ExtractChecksum()