mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +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
2 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue