Skip to content

softlink: friendly error on WinError 1314 (no symlink privilege) - #30

Merged
tommyjcarpenter merged 1 commit into
mainfrom
winerror-1314-friendly-msg
May 9, 2026
Merged

softlink: friendly error on WinError 1314 (no symlink privilege)#30
tommyjcarpenter merged 1 commit into
mainfrom
winerror-1314-friendly-msg

Conversation

@tommyjcarpenter

@tommyjcarpenter tommyjcarpenter commented May 9, 2026

Copy link
Copy Markdown
Owner

Catch `OSError` with `winerror == 1314` in `_softlink` and re-raise as a `RuntimeError` that tells the user how to fix it (enable Developer Mode, or run elevated). Without this, a fresh Windows machine without Developer Mode gets a raw stack trace from the bottom of `utils.py` and no hint what's wrong

If os.symlink fails with WinError 1314 (SeCreateSymbolicLinkPrivilege
not held), re-raise as a RuntimeError that points the user at the fix:
enable Developer Mode, or run bootstrap from an elevated shell. Without
this they get a raw OSError stack trace from the bottom of utils.py
with no clue what to do.

Signed-off-by: Tommy Carpenter <9419125+tommyjcarpenter@users.noreply.github.com>
@tommyjcarpenter
tommyjcarpenter merged commit 7468b4d into main May 9, 2026
5 checks passed
@tommyjcarpenter
tommyjcarpenter deleted the winerror-1314-friendly-msg branch May 9, 2026 20:06
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.

1 participant