diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-10-17 13:57:51 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-10-17 13:58:31 -0400 |
| commit | 4e038a43cc9978af1015c53ab7cf27355d989069 (patch) | |
| tree | 36621411192ca62bbb552de5277e1ca3c4c35670 /src/Propellor/CmdLine.hs | |
| parent | a487fd07dc72ba506b3d185c4d9317e5a443faa3 (diff) | |
use Info to detect controller loops
Much less invasive than the other implementation.
Diffstat (limited to 'src/Propellor/CmdLine.hs')
| -rw-r--r-- | src/Propellor/CmdLine.hs | 7 |
1 files changed, 2 insertions, 5 deletions
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) ) |
