[MM-32234] Fix config.json getting reset (#16805)
* Add support for read-only config stores * Allow read/write config store for plugin commands that require it
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
77da23e84b
Коммит
9c9fbe6dd9
@@ -104,7 +104,7 @@ func init() {
|
||||
}
|
||||
|
||||
func pluginAddCmdF(command *cobra.Command, args []string) error {
|
||||
a, err := InitDBCommandContextCobra(command)
|
||||
a, err := InitDBCommandContextCobraReadWrite(command)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -134,7 +134,7 @@ func pluginAddCmdF(command *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
func pluginDeleteCmdF(command *cobra.Command, args []string) error {
|
||||
a, err := InitDBCommandContextCobra(command)
|
||||
a, err := InitDBCommandContextCobraReadWrite(command)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -158,7 +158,7 @@ func pluginDeleteCmdF(command *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
func pluginEnableCmdF(command *cobra.Command, args []string) error {
|
||||
a, err := InitDBCommandContextCobra(command)
|
||||
a, err := InitDBCommandContextCobraReadWrite(command)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -182,7 +182,7 @@ func pluginEnableCmdF(command *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
func pluginDisableCmdF(command *cobra.Command, args []string) error {
|
||||
a, err := InitDBCommandContextCobra(command)
|
||||
a, err := InitDBCommandContextCobraReadWrite(command)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -265,7 +265,7 @@ func pluginPublicKeysCmdF(command *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
func pluginAddPublicKeyCmdF(command *cobra.Command, args []string) error {
|
||||
a, err := InitDBCommandContextCobra(command)
|
||||
a, err := InitDBCommandContextCobraReadWrite(command)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -296,7 +296,7 @@ func pluginAddPublicKeyCmdF(command *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
func pluginDeletePublicKeyCmdF(command *cobra.Command, args []string) error {
|
||||
a, err := InitDBCommandContextCobra(command)
|
||||
a, err := InitDBCommandContextCobraReadWrite(command)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user