summaryrefslogtreecommitdiff
path: root/src/Propellor/CmdLine.hs
diff options
context:
space:
mode:
authorJoey Hess2016-03-06 18:15:00 -0400
committerJoey Hess2016-03-06 18:15:00 -0400
commit4bbab3db9856b1c3fb4403add8b391179baf29c6 (patch)
treeb8b3ae409aef1bdad15b906703f3adae838f8c2a /src/Propellor/CmdLine.hs
parent7899f23d991aa901c110b5bf276c0c7fb165799a (diff)
stop using --continue SimpleRun for spin
When spinning a remote host, we do want to rebuild propellor on it, and this use of --continue that did a rebuild was different from all the other uses of --continue that avoided a rebuild. This fixes a build loop involving that special case. When --continue SimpleRun ran a rebuild, it re-execed propellor with --continue SimpleRun, and so would rebuild again, and re-exec again if the binary kept changing. Backwards compatability should be ok; old versions of propellor, when run with --serialized SimpleRun by the new version, do a buildFirst, followed by another (redundant) buildFirst, and then run. The one redundant buildFirst is not a problem in the upgrade scenario. (Unfortunately, I can't rename SimpleRun to something nicer despite only spin using it; backwards compatability does prevent that.)
Diffstat (limited to 'src/Propellor/CmdLine.hs')
-rw-r--r--src/Propellor/CmdLine.hs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/Propellor/CmdLine.hs b/src/Propellor/CmdLine.hs
index 5e6769c9..f708c1d9 100644
--- a/src/Propellor/CmdLine.hs
+++ b/src/Propellor/CmdLine.hs
@@ -125,12 +125,8 @@ defaultMain hostlist = withConcurrentOutput $ do
( runhost hn
, go cr (Spin [hn] Nothing)
)
- go _ (SimpleRun hn) = runhost hn
- go cr (Continue cmdline@(SimpleRun hn)) =
- -- --continue SimpleRun is used by --spin,
- -- and unlike all other uses of --continue, this legacy one
- -- wants a build first
- forceConsole >> fetchFirst (buildFirst cr cmdline (runhost hn))
+ go cr cmdline@(SimpleRun hn) = forceConsole >>
+ fetchFirst (buildFirst cr cmdline (runhost hn))
-- When continuing after a rebuild, don't want to rebuild again.
go _ (Continue cmdline) = go NoRebuild cmdline