diff options
-rw-r--r-- | nixos/lib/make-disk-image.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix index 3f50bb431c5e..023d0791a5c7 100644 --- a/nixos/lib/make-disk-image.nix +++ b/nixos/lib/make-disk-image.nix @@ -257,7 +257,8 @@ let format' = format; in let ''} echo "copying staging root to image..." - cptofs -p ${optionalString (partitionTableType != "none") "-P ${rootPartition}"} -t ${fsType} -i $diskImage $root/* / + cptofs -p ${optionalString (partitionTableType != "none") "-P ${rootPartition}"} -t ${fsType} -i $diskImage $root/* / || + (echo >&2 "ERROR: cptofs failed. diskSize might be too small for closure."; exit 1) ''; in pkgs.vmTools.runInLinuxVM ( pkgs.runCommand name |