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

fix: missing plugin parent dir causes unrecoverable failure #273

Merged
merged 1 commit into from
Dec 28, 2024

Conversation

FedeAbella
Copy link
Collaborator

If the plugin folder defined in the config contains parents that don't exists (e.g.: my plugin folder is ./.sf/sf_cache, and a brand new project doesn't create the .sf folder), creating the plugin folder fails. The error message was not shown, and in my case, it even prevented the lsps from loading (I'm guessing it must be something to do with the BufEnter autocmd).

This PR makes it so:

  • The call to mkdir also creates parent directories if needed (no reason not to)
  • The call to create the dir is protected, and the error is shown if it fails, but doesn't cause complete failure

@xixiaofinland
Copy link
Owner

Thanks again!

@xixiaofinland xixiaofinland merged commit ab92f64 into main Dec 28, 2024
5 checks passed
@xixiaofinland xixiaofinland deleted the feature/fix-mkdir branch December 28, 2024 19:56
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