1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-08 22:36:49 +02:00

Let schema/config.json end with a line feed (#4092)

- **PR Description**

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:08:28 +01:00
committed by GitHub
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)

View File

@@ -1725,4 +1725,4 @@
},
"additionalProperties": false,
"type": "object"
}
}