You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I recently had my lazygit config become deprecated. Specifically from this key path migration.
However my config file is a symlink to my /nix/store (it's managed by nix itself) so it's immutable. When I tried to open lazygit after this schema change, I only got this output to my shell:
2025/01/24 10:31:27 Couldn't write migrated config back to `/home/$USER/.config/lazygit/config.yml`: open /home/$USER/.config/lazygit/config.yml: read-only file system
which is not intuitive at all. I had to read the source code to finally find this snippet to explain why this happened:
// Write config back if changedifstring(changedContent) !=string(content) {
iferr:=os.WriteFile(path, changedContent, 0o644); err!=nil {
returnnil, fmt.Errorf("Couldn't write migrated config back to `%s`: %s", path, err)
}
returnchangedContent, nil
}
Describe the solution you'd like
I think lazygit should be telling the user that it's trying to rewrite my config file to self-heal it, especially if the os write leads to a failure.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I recently had my lazygit config become deprecated. Specifically from this key path migration.
However my config file is a symlink to my
/nix/store
(it's managed by nix itself) so it's immutable. When I tried to open lazygit after this schema change, I only got this output to my shell:which is not intuitive at all. I had to read the source code to finally find this snippet to explain why this happened:
Describe the solution you'd like
I think lazygit should be telling the user that it's trying to rewrite my config file to self-heal it, especially if the os write leads to a failure.
The text was updated successfully, but these errors were encountered: