about summary refs log tree commit diff
path: root/nixos/lib
diff options
context:
space:
mode:
authorJörg Thalheim2021-01-29 07:18:50 +0000
committerGitHub2021-01-29 07:18:50 +0000
commite5ce05cc1eee0b8d890726e9826791ef95c51793 (patch)
tree56fad483544dc1048f70043a2430766ee2275467 /nixos/lib
parent27c60f4959e445498c14eb8901031923f28b4fe0 (diff)
parent60c8cf4e02f240616e906d6333ebef23b6dfb382 (diff)
Merge pull request #67493 from clefru/make-disk-image
Diffstat (limited to 'nixos/lib')
-rw-r--r--nixos/lib/make-disk-image.nix3
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