lotus-provider fixes

This commit is contained in:
Andrew Jackson (Ajax)
2023-08-29 23:16:05 -05:00
parent 339f7bf03f
commit 5c00f8d66e
4 changed files with 38 additions and 38 deletions
-10
View File
@@ -343,21 +343,11 @@ func Repo(r repo.Repo) Option {
func Provider(r repo.Repo) Option {
return func(settings *Settings) error {
lr, err := r.Lock(settings.nodeType)
if err != nil {
return err
}
c, err := lr.Config()
if err != nil {
return err
}
_ = c
return Options(
func(s *Settings) error { s.Base = true; return nil }, // mark Base as applied
ApplyIf(func(s *Settings) bool { return s.Config },
Error(errors.New("the Base() option must be set before Config option")),
),
Override(new(repo.LockedRepo), modules.LockedRepo(lr)), // module handles closing
//ApplyIf(IsType(repo.WdPost), ConfigWdPost(c)),
//ApplyIf(IsType(repo.WinPost), ConfigWinPost(c)),
)(settings)