Skip to content

Commit fcd9bee

Browse files
Enable empty configuration merging
1 parent 8d3c23c commit fcd9bee

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: commands/daemon/settings.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,13 @@ func (s *ArduinoCoreServerImpl) SettingsMerge(ctx context.Context, req *rpc.Sett
7979
// Set each value individually.
8080
// This is done because Viper ignores empty strings or maps when
8181
// using the MergeConfigMap function.
82+
updatedSettings := configuration.Init("")
8283
for k, v := range mapped {
83-
configuration.Settings.Set(k, v)
84+
updatedSettings.Set(k, v)
8485
}
86+
configPath := configuration.Settings.ConfigFileUsed()
87+
updatedSettings.SetConfigFile(configPath)
88+
configuration.Settings = updatedSettings
8589

8690
return &rpc.SettingsMergeResponse{}, nil
8791
}

0 commit comments

Comments
 (0)