summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Propellor/Property/Libvirt.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Propellor/Property/Libvirt.hs b/src/Propellor/Property/Libvirt.hs
index 000f56c4..eb586df6 100644
--- a/src/Propellor/Property/Libvirt.hs
+++ b/src/Propellor/Property/Libvirt.hs
@@ -94,10 +94,11 @@ kvmDefined imageType mem cpus auto h =
(setupRevertableProperty $ imageBuiltFor h
(image) (Debootstrapped mempty))
nuked :: Property UnixLike
- nuked = property "destroy the chroot used to build the image" $ do
+ nuked = check (not <$> doesDirectoryExist (imageLoc <.> "chroot"))
+ (property "destroy the chroot used to build the image" $ do
liftIO $ removeChroot (imageLoc <.> "chroot")
liftIO $ nukeFile (imageLoc <.> "parttable")
- return MadeChange
+ return MadeChange)
defined :: Property UnixLike
defined = check (not <$> doesFileExist conf)
(scriptProperty