Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

‎commands/daemon/settings.go‎

Lines changed: 5 additions & 1 deletion
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)

AltStyle によって変換されたページ (->オリジナル) /