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

Don't crash when getcwd fails #6881

Closed
wants to merge 1 commit into from

Conversation

sam-mccall
Copy link
Contributor

This can happen e.g. when you lose access to the filesystem

get_relative_path() already returns absolute paths when the input isn't under the working directory, so we just return absolute paths in this case too.

This can happen e.g. when you lose access to the filesystem

get_relative_path() already returns absolute paths when the input isn't under the working directory, so we just return absolute paths in this case too.
@pascalkuthe
Copy link
Member

In general this is a good change but we unwrap/except env::curennt_dir() in a bunch of other places (I found at least 4 case with a quick grep) so those should probably receive a similar treatment.

@the-mikedavis
Copy link
Member

Superseded by #7185

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.

3 participants