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:
parent
c3cf48cc49
commit
10db72d223
@ -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)
|
||||
|
@ -1725,4 +1725,4 @@
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user