From 4e038a43cc9978af1015c53ab7cf27355d989069 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 17 Oct 2015 13:57:51 -0400 Subject: use Info to detect controller loops Much less invasive than the other implementation. --- src/Propellor/CmdLine.hs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/Propellor/CmdLine.hs') diff --git a/src/Propellor/CmdLine.hs b/src/Propellor/CmdLine.hs index 1225f411..e0830693 100644 --- a/src/Propellor/CmdLine.hs +++ b/src/Propellor/CmdLine.hs @@ -119,14 +119,11 @@ defaultMain hostlist = do go True cmdline = updateFirst cmdline $ go False cmdline go False (Spin hs r) = do commitSpin - forM_ hs $ \hn -> withhost hn $ - spin hn r mempty + forM_ hs $ \hn -> withhost hn $ spin hn r go False cmdline@(SimpleRun hn) = buildFirst cmdline $ go False (Run hn) - go False cmdline@(ControlledRun hn cc) = buildFirst cmdline $ - onlyprocess $ withhost hn $ mainProperties cc go False (Run hn) = ifM ((==) 0 <$> getRealUserID) - ( onlyprocess $ withhost hn $ mainProperties mempty + ( onlyprocess $ withhost hn mainProperties , go True (Spin [hn] Nothing) ) -- cgit v1.2.3