losing my mind

This commit is contained in:
A.Unger
2021-11-11 15:12:37 +01:00
parent a29f10e764
commit 3580e16771
21 changed files with 59 additions and 66 deletions
+3 -9
View File
@@ -5,7 +5,6 @@ package command
import (
"github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/ocis-pkg/shared"
"github.com/owncloud/ocis/ocis/pkg/register"
"github.com/owncloud/ocis/settings/pkg/command"
"github.com/urfave/cli/v2"
@@ -13,8 +12,6 @@ import (
// SettingsCommand is the entry point for the settings command.
func SettingsCommand(cfg *config.Config) *cli.Command {
var globalLog shared.Log
return &cli.Command{
Name: "settings",
Usage: "Start settings server",
@@ -27,16 +24,13 @@ func SettingsCommand(cfg *config.Config) *cli.Command {
return err
}
globalLog = cfg.Log
if cfg.Commons != nil {
cfg.Settings.Commons = cfg.Commons
}
return nil
},
Action: func(c *cli.Context) error {
// if accounts logging is empty in ocis.yaml
if (cfg.Settings.Log == shared.Log{}) && (globalLog != shared.Log{}) {
// we can safely inherit the global logging values.
cfg.Settings.Log = globalLog
}
origCmd := command.Server(cfg.Settings)
return handleOriginalAction(c, origCmd)
},