From f5a7b6b014b0425a9143d151286dc0e9539e6f69 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 13 Nov 2017 10:42:28 -0700 Subject: emit an error when property is reverted, too Thanks Joey! --- src/Propellor/Property/Sbuild.hs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/Propellor') diff --git a/src/Propellor/Property/Sbuild.hs b/src/Propellor/Property/Sbuild.hs index e771e7bc..f96435cf 100644 --- a/src/Propellor/Property/Sbuild.hs +++ b/src/Propellor/Property/Sbuild.hs @@ -91,17 +91,19 @@ built -> Props metatypes -> RevertableProperty (HasInfo + DebianLike) Linux built cc ps = case schrootSystem ps of - Nothing -> emitError doNothing + Nothing -> emitError Just s@(System _ arch) -> case extractSuite s of - Nothing -> emitError doNothing + Nothing -> emitError Just suite -> built' cc ps suite (architectureToDebianArchString arch) where schrootSystem :: Props metatypes -> Maybe System schrootSystem (Props ps') = fromInfoVal . fromInfo $ mconcat (map getInfo ps') - emitError = impossible - "sbuild schroot does not specify suite and/or architecture" + + emitError :: RevertableProperty (HasInfo + DebianLike) Linux + emitError = impossible theError impossible theError + theError = "sbuild schroot does not specify suite and/or architecture" built' :: UseCcache -- cgit v1.2.3