-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nixfmt does overwrite symlinks with reformatted contents #56
Comments
Thanks for reporting! I made a PR with a fix that should be merged soon. Unfortunately, our releases go through hackage and that can be kind of slow. If you don't want to wait for those, the README contains instruction for installing nixfmt from master. |
As far as I see, the version fix should already be available in latest release, at least according to the GitHub interface, though it doesn't seem to be in Though I might consider an installation from source, as in general the process behind updating something in nixpkgs seems to be quite slow. |
Is there still someone working on this? |
See #151 |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/formatting-team-meeting-2024-08-06/50222/1 |
When I have a symlink and pass it to
nixfmt
(eg because of using globbing from the shell as innixfmt **/*.nix
) it gets overwritten by a regular file containing the formatted target.nixfmt
should either ignore symlinks or write to the symlinks target, rather than overwriting the symlink.Sadly it seems as if in my version of
nixfmt
#50 isn't fixed yet.The text was updated successfully, but these errors were encountered: