Skip to content

Fix error with specific ssh configurations #345

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

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

foreverigor
Copy link
Contributor

To create missing .ssh folder Files.createDirectories(...) is used which always tries to create a directory.
In some cases, especially when .ssh is actually a symbolic link this results in an uncatched FileAlreadyExistsException being thrown.

This PR mitigates this by replacing the folder creation with File#mkdirs() which checks the existence of the path before doing anything.

Copy link
Member

@code-asher code-asher left a comment

Choose a reason for hiding this comment

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

Thank you!

@code-asher code-asher merged commit 8c676c6 into coder:main Jan 5, 2024
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.

2 participants