Skip to content

Commit 943f76e

Browse files
authored
Add lib to LOAD_PATH instead of using require_relative (#1140)
1 parent 4e80438 commit 943f76e

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ jobs:
4444
run: bundle exec rake
4545

4646
- name: Run index troubleshooting tool
47-
run: ./exe/ruby-lsp-doctor
47+
run: bundle exec ruby-lsp-doctor

exe/ruby-lsp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ rescue
8585
nil
8686
end
8787

88-
require_relative "../lib/ruby_lsp/internal"
88+
$LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
89+
require "ruby_lsp/internal"
8990

9091
if options[:debug]
9192
if ["x64-mingw-ucrt", "x64-mingw32"].include?(RUBY_PLATFORM)

exe/ruby-lsp-check

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ rescue
1414
nil
1515
end
1616

17-
require_relative "../lib/ruby_lsp/internal"
17+
$LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
18+
require "ruby_lsp/internal"
1819

1920
RubyLsp::Addon.load_addons
2021

exe/ruby-lsp-doctor

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#!/usr/bin/env ruby
22
# frozen_string_literal: true
33

4-
require "bundler/setup"
5-
4+
$LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
65
require "ruby_lsp/internal"
76

87
index = RubyIndexer::Index.new

0 commit comments

Comments
 (0)