From 2293b46bf714ca5675515496c041952310b7bae2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 20 Nov 2014 16:04:48 -0400 Subject: fix chroot info propigation --- src/Propellor/Property/Chroot.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/Propellor/Property/Chroot.hs') diff --git a/src/Propellor/Property/Chroot.hs b/src/Propellor/Property/Chroot.hs index 38e09b52..9ce9ddaf 100644 --- a/src/Propellor/Property/Chroot.hs +++ b/src/Propellor/Property/Chroot.hs @@ -53,9 +53,11 @@ provisioned c@(Chroot loc system _) = RevertableProperty teardown = undefined propigateChrootInfo :: Chroot -> Property -> Property -propigateChrootInfo c@(Chroot loc _ h) p = propigateInfo c p (<> chrootinfo) - where - chrootinfo = mempty $ mempty { _chroots = M.singleton loc h } +propigateChrootInfo c p = propigateInfo c p (<> chrootInfo c) + +chrootInfo :: Chroot -> Info +chrootInfo (Chroot loc _ h) = + mempty { _chrootinfo = mempty { _chroots = M.singleton loc h } } -- | Propellor is run inside the chroot to provision it. -- -- cgit v1.2.3