move config parse error logging into function to ensure new lines and don't parse config for help

This commit is contained in:
Willy Kloucek
2022-08-18 08:57:27 +00:00
committed by Willy Kloucek
parent d1f0dbc4c9
commit e58eaabdeb
92 changed files with 241 additions and 526 deletions

View File

@@ -1,9 +1,8 @@
package command
import (
"fmt"
"github.com/owncloud/ocis/v2/ocis-pkg/config"
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
"github.com/owncloud/ocis/v2/ocis/pkg/register"
@@ -18,9 +17,7 @@ func ThumbnailsCommand(cfg *config.Config) *cli.Command {
Usage: helper.SubcommandDescription(cfg.Thumbnails.Service.Name),
Category: "services",
Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg, true); err != nil {
fmt.Printf("%v", err)
}
configlog.LogError(parser.ParseConfig(cfg, true))
cfg.Thumbnails.Commons = cfg.Commons
return nil
},