summaryrefslogtreecommitdiff
path: root/src/Propellor
diff options
context:
space:
mode:
authorJoey Hess2014-11-18 18:26:15 -0400
committerJoey Hess2014-11-18 18:26:15 -0400
commitb7bbde3d72e81fb04d5c3747f14c0b3a656334c0 (patch)
treeccccd9a7f0a82249a2c6be90e768b4d925551fc6 /src/Propellor
parent4bbee8eac6c49fb5f6722910afb353aadcd1ef03 (diff)
avoid extra git pull when --spin calles first --boot and then --run
Diffstat (limited to 'src/Propellor')
-rw-r--r--src/Propellor/CmdLine.hs4
-rw-r--r--src/Propellor/Types.hs1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/Propellor/CmdLine.hs b/src/Propellor/CmdLine.hs
index bbbcf188..21ad5dba 100644
--- a/src/Propellor/CmdLine.hs
+++ b/src/Propellor/CmdLine.hs
@@ -96,6 +96,8 @@ defaultMain hostlist = do
go True cmdline@(Spin _) = buildFirst cmdline $ go False cmdline
go True cmdline = updateFirst cmdline $ go False cmdline
go False (Spin hn) = withhost hn $ spin hn
+ go False cmdline@(SimpleRun hn) = buildFirst cmdline $
+ go False (Run hn)
go False (Run hn) = ifM ((==) 0 <$> getRealUserID)
( onlyProcess $ withhost hn mainProperties
, go True (Spin hn)
@@ -278,7 +280,7 @@ spin hn hst = do
]
runcmd = mkcmd
- [ "cd " ++ localdir ++ " && ./propellor --run " ++ hn ]
+ [ "cd " ++ localdir ++ " && ./propellor --continue " ++ shellEscape (show (SimpleRun hn)) ]
showremote s = putStrLn s
diff --git a/src/Propellor/Types.hs b/src/Propellor/Types.hs
index f70eee68..e0a71130 100644
--- a/src/Propellor/Types.hs
+++ b/src/Propellor/Types.hs
@@ -138,6 +138,7 @@ instance ActionResult Result where
data CmdLine
= Run HostName
| Spin HostName
+ | SimpleRun HostName
| Set PrivDataField Context
| Dump PrivDataField Context
| Edit PrivDataField Context