Skip to content

Commit

Permalink
Prevent relative require completion from failing on permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
vinistock committed Feb 7, 2025
1 parent 93e1652 commit c1ceb26
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/ruby_lsp/listeners/completion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,9 @@ def complete_require_relative(node)
path_node_to_complete,
)
end
rescue Errno::EPERM
# If the user writes a relative require pointing to a path that the editor has no permissions to read, then glob
# might fail with EPERM
end

sig { params(node: Prism::CallNode, name: String).void }
Expand Down

0 comments on commit c1ceb26

Please sign in to comment.