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

Improve error message when symlink failed on Windows #565

Conversation

straight-shoota
Copy link
Member

This patch adds a helpful message when encountering a failure to create symlinks in Windows which can likely be fixed by enabling developer mode.

The implementation is very dumb, just catching all File::AccessDeniedError and check whether it was caused by a missing privilege for symlink creation.
Alterantively, we could use a wrapper for File.symlink which checks this directly at every call site (it's only 2). But I think it's easier this way.

Resolves #556

@straight-shoota straight-shoota modified the milestones: 0.17.2, 0.18.0 Dec 22, 2022
@straight-shoota straight-shoota merged commit f80f39e into crystal-lang:master Dec 23, 2022
@straight-shoota straight-shoota deleted the feature/win-symlinks-error branch December 23, 2022 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows: A required privilege is not held by the client
3 participants