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

Make calls to realpath safe, like stat #1698

Merged
merged 1 commit into from
Mar 29, 2021

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented Mar 29, 2021

For microsoft/pylance-release#1102.

realpath can fail similarly to stat (because it's largely a stat wrapper). Wrap it like we do stat to ensure we don't fail to realpath a broken link.

Copy link
Collaborator

@erictraut erictraut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jakebailey jakebailey merged commit 75e43b3 into microsoft:master Mar 29, 2021
@jakebailey jakebailey deleted the safe-realpath branch March 29, 2021 23:57
heejaechang pushed a commit to heejaechang/pyright that referenced this pull request Nov 3, 2021
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.

None yet

2 participants