Merge pull request #3769 from owncloud/fix-commands

remove returns from the commands to prevent silent crash
This commit is contained in:
Christian Richter authored and GitHub committed 2022-05-11 17:28:25 +02:00
commit 0aa995f4e7
29 files changed
-29

No files matched your search

-1
View File
@@ -19,7 +19,6 @@ func AppRegistryCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.AppRegistry.Commons = cfg.Commons cfg.AppRegistry.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func AppProviderCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.AppProvider.Commons = cfg.Commons cfg.AppProvider.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func AuditCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.Audit.Commons = cfg.Commons cfg.Audit.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func AuthBasicCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.AuthBasic.Commons = cfg.Commons cfg.AuthBasic.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func AuthBearerCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.AuthBearer.Commons = cfg.Commons cfg.AuthBearer.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func AuthMachineCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.AuthMachine.Commons = cfg.Commons cfg.AuthMachine.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func FrontendCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.Frontend.Commons = cfg.Commons cfg.Frontend.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func GatewayCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.Gateway.Commons = cfg.Commons cfg.Gateway.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func GraphCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.Graph.Commons = cfg.Commons cfg.Graph.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func GraphExplorerCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.GraphExplorer.Commons = cfg.Commons cfg.GraphExplorer.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func GroupsCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.Groups.Commons = cfg.Commons cfg.Groups.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func IDMCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.IDM.Commons = cfg.Commons cfg.IDM.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func IDPCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.IDP.Commons = cfg.Commons cfg.IDP.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func NatsCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.Nats.Commons = cfg.Commons cfg.Nats.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func NotificationsCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.Notifications.Commons = cfg.Commons cfg.Notifications.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func OCDavCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.OCDav.Commons = cfg.Commons cfg.OCDav.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func OCSCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.OCS.Commons = cfg.Commons cfg.OCS.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func ProxyCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.Proxy.Commons = cfg.Commons cfg.Proxy.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func SettingsCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.Settings.Commons = cfg.Commons cfg.Settings.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func SharingCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.Sharing.Commons = cfg.Commons cfg.Sharing.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func StorageSystemCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.StorageSystem.Commons = cfg.Commons cfg.StorageSystem.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func StoragePublicLinkCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.StoragePublicLink.Commons = cfg.Commons cfg.StoragePublicLink.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func StorageSharesCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.StorageShares.Commons = cfg.Commons cfg.StorageShares.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func StorageUsersCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.StorageUsers.Commons = cfg.Commons cfg.StorageUsers.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -20,7 +20,6 @@ func StoreCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.Store.Commons = cfg.Commons cfg.Store.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func ThumbnailsCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.Thumbnails.Commons = cfg.Commons cfg.Thumbnails.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func UsersCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.Users.Commons = cfg.Commons cfg.Users.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -19,7 +19,6 @@ func WebCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.Web.Commons = cfg.Commons cfg.Web.Commons = cfg.Commons
return nil return nil
-1
View File
@@ -20,7 +20,6 @@ func WebDAVCommand(cfg *config.Config) *cli.Command {
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil { if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err) fmt.Printf("%v", err)
return err
} }
cfg.WebDAV.Commons = cfg.Commons cfg.WebDAV.Commons = cfg.Commons
return nil return nil