Ignore inexistent partitions during cleanup

This commit is contained in:
Manuel Thalmann 2024-06-23 15:03:47 +02:00
parent 485c0c70f3
commit f02db08ccf

View file

@ -80,7 +80,7 @@
appendScript = script: fdiskScript script true; appendScript = script: fdiskScript script true;
cleanup = lib.strings.concatLines (builtins.map cleanup = lib.strings.concatLines (builtins.map
(partition: fdiskCommand "--delete ${diskVar} ${toString partition.index}") (partition: "${fdiskCommand "--delete ${diskVar} ${toString partition.index}"} || true")
(builtins.filter (_: !_.keepExisting) partitions)); (builtins.filter (_: !_.keepExisting) partitions));
fdiskCommands = lib.strings.concatLines ( fdiskCommands = lib.strings.concatLines (