diff options
Diffstat (limited to 'Command/EnableRemote.hs')
-rw-r--r-- | Command/EnableRemote.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Command/EnableRemote.hs b/Command/EnableRemote.hs index 1d4c4af5e..84216dd78 100644 --- a/Command/EnableRemote.hs +++ b/Command/EnableRemote.hs @@ -11,7 +11,7 @@ import Common.Annex import Command import qualified Logs.Remote import qualified Types.Remote as R -import qualified Command.InitRemote as InitRemote +import qualified Annex.SpecialRemote import qualified Data.Map as M @@ -26,21 +26,20 @@ seek = withWords start start :: [String] -> CommandStart start [] = unknownNameError "Specify the name of the special remote to enable." -start (name:ws) = go =<< InitRemote.findExisting name +start (name:ws) = go =<< Annex.SpecialRemote.findExisting name where config = Logs.Remote.keyValToConfig ws go Nothing = unknownNameError "Unknown special remote name." go (Just (u, c)) = do let fullconfig = config `M.union` c - t <- InitRemote.findType fullconfig - + t <- either error return (Annex.SpecialRemote.findType fullconfig) showStart "enableremote" name next $ perform t u fullconfig unknownNameError :: String -> Annex a unknownNameError prefix = do - names <- InitRemote.remoteNames + names <- Annex.SpecialRemote.remoteNames error $ prefix ++ "\n" ++ if null names then "(No special remotes are currently known; perhaps use initremote instead?)" |