1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-23 12:18:51 +02:00

Let schema/config.json end with a line feed

Some editors add one automatically when saving the file, which causes confusion
and ugly diffs containing `\ No newline at end of file`.
This commit is contained in:
Stefan Haller 2024-11-30 15:03:29 +01:00
parent c3cf48cc49
commit 10db72d223
2 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@ func GetSchemaDir() string {
func GenerateSchema() {
schema := customReflect(&config.UserConfig{})
obj, _ := json.MarshalIndent(schema, "", " ")
obj = append(obj, '\n')
if err := os.WriteFile(GetSchemaDir()+"/config.json", obj, 0o644); err != nil {
fmt.Println("Error writing to file:", err)