convert configParser to Annex action and add passthrough option

Needed so Remote.External can query the external program for its
configs. When the external program does not support the query,
the passthrough option will make all input fields be available.
This commit is contained in:
Joey Hess 2020-01-14 13:18:15 -04:00
parent 8f142a9279
commit c498269a88
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
16 changed files with 70 additions and 47 deletions

View file

@ -122,7 +122,7 @@ remoteGen m t g = do
let cu = fromMaybe u $ remoteAnnexConfigUUID gc
let rs = RemoteStateHandle cu
let c = fromMaybe M.empty $ M.lookup cu m
let pc = either mempty id (parseRemoteConfig c (configParser t))
pc <- either mempty id . parseRemoteConfig c <$> configParser t
generate t g u pc gc rs >>= \case
Nothing -> return Nothing
Just r -> Just <$> adjustExportImport (adjustReadOnly (addHooks r)) rs