Skip to content

Conversation

@sei40kr
Copy link

@sei40kr sei40kr commented Jan 21, 2025

Description

Skip docs task for plugins in read-only directories to avoid errors.

This assumes a case where, for example, lazy.nvim references a plugin in the Nix store.

M.docs = {
skip = function(plugin)
return not plugin._.is_local and not plugin._.dirty
return not plugin._.is_local and not plugin._.dirty or not vim.uv.fs_access(plugin.dir, "W")
Copy link
Author

Choose a reason for hiding this comment

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

If the plugin is not local, it is likely not read-only, in which case it may save IO costs by not checking permissions.

Suggested change
return not plugin._.is_local and not plugin._.dirty or not vim.uv.fs_access(plugin.dir, "W")
return not plugin._.is_local and not plugin._.dirty or plugin._.is_local and not vim.uv.fs_access(plugin.dir, "W")

@github-actions
Copy link
Contributor

This PR is stale because it has been open 30 days with no activity.

@github-actions github-actions bot added the stale This issue or PR has been inactive for a while label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale This issue or PR has been inactive for a while

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant