Skip to content
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

Disable following links #884

Merged
merged 1 commit into from
Oct 24, 2024
Merged

Conversation

dpaetzel
Copy link
Contributor

Thanks for developing and maintaining this project! 🙂

Following links resulted on my machine (running NixOS and using devenv) in precompilation of JuliaFormatter failing because it attempted to format read-only .jl files (because .devenv/profile links to readonly /nix/store/… directories). Since I don't see a case where I want JuliaFormatter to jump to far-away directories by following links and reformat them (looks rather dangerous to me, actually?), I simply disabled following links. In case you want to integrate this tiny change, I created this PR.

Note that this could be improved by checking whether the link points to a file within the currently-to-be-formatted directory or something like that.

Following links resulted on my machine (running NixOS and using devenv)
in precompilation attempting to format read-only .jl files (because
`.devenv/profile` links to readonly `/nix/store/…` directories). Since I
don't see a case where you may want JuliaFormatter to jump to far-away
directory by following links (looks rather dangerous to me, actually?),
I simply disabled following links.

Note this could be improved by checking whether the link points to a
file within the currently-to-be-formatted directory.
@domluna
Copy link
Owner

domluna commented Oct 24, 2024

makes sense thanks!

@domluna domluna merged commit 474673e into domluna:master Oct 24, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants