make extendcluster also updatecluster

This avoids the user forgetting to do it and simplifies the
documentation.
This commit is contained in:
Joey Hess 2024-06-27 15:34:45 -04:00
parent 85f4527d74
commit 41a0817188
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 10 additions and 4 deletions

View file

@ -15,6 +15,7 @@ import Types.Cluster
import Config
import Types.GitConfig
import qualified Remote
import qualified Command.UpdateCluster
import qualified Data.Map as M
@ -27,7 +28,9 @@ seek (remotename:clustername:[]) = Remote.byName (Just clusterremotename) >>= \c
Just clusterremote -> Remote.byName (Just remotename) >>= \case
Just gatewayremote ->
case mkClusterUUID (Remote.uuid clusterremote) of
Just cu -> commandAction $ start cu clustername gatewayremote
Just cu -> do
commandAction $ start cu clustername gatewayremote
Command.UpdateCluster.seek []
Nothing -> giveup $ clusterremotename
++ " is not a cluster remote."
Nothing -> giveup $ "No remote named " ++ remotename ++ " exists."