update commands when running in supervised mode
This commit is contained in:
@@ -5,8 +5,6 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
|
||||
"github.com/thejerf/suture"
|
||||
"github.com/micro/cli/v2"
|
||||
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
@@ -14,6 +12,7 @@ import (
|
||||
"github.com/owncloud/ocis/settings/pkg/flagset"
|
||||
"github.com/owncloud/ocis/settings/pkg/version"
|
||||
"github.com/spf13/viper"
|
||||
"github.com/thejerf/suture"
|
||||
)
|
||||
|
||||
// Execute is the entry point for the ocis-settings command.
|
||||
@@ -122,6 +121,9 @@ type SutureService struct {
|
||||
func NewSutureService(ctx context.Context, cfg *ociscfg.Config) suture.Service {
|
||||
sctx, cancel := context.WithCancel(ctx)
|
||||
cfg.Settings.Context = sctx
|
||||
if cfg.Mode == 0 {
|
||||
cfg.Settings.Supervised = true
|
||||
}
|
||||
return SutureService{
|
||||
ctx: sctx,
|
||||
cancel: cancel,
|
||||
|
||||
Reference in New Issue
Block a user