crystal-lang / shards

Dependency manager for the Crystal language
Other
766 stars 102 forks source link

Improve error message when symlink failed on Windows #565

Closed straight-shoota closed 1 year ago

straight-shoota commented 1 year ago

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