legacyApplyValue is the real implementation used by the legacy `set` path. It is kept separate from legacyUnsetConfig so the `set` and `unset` flows can evolve independently without sharing a boolean toggle.
(path, key, value string)
| 336 | // It is kept separate from legacyUnsetConfig so the `set` and `unset` flows |
| 337 | // can evolve independently without sharing a boolean toggle. |
| 338 | func legacyApplyValue(path, key, value string) error { |
| 339 | cfg, err := loadConfigFile(path) |
| 340 | if err != nil { |
| 341 | return err |
| 342 | } |
| 343 | parts, err := editorconfig.Parse(key) |
| 344 | if err != nil { |
| 345 | return err |
| 346 | } |
| 347 | editorconfig.Set(cfg, parts, editorconfig.ParseScalar(value)) |
| 348 | return writeConfigFile(path, cfg) |
| 349 | } |
no test coverage detected