Skip to content

Commit b782897

Browse files
committed
Fallback to load syntax_suggest/api when failing to load with require_relative.
1 parent cd1df27 commit b782897

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

exe/syntax_suggest

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#!/usr/bin/env ruby
22

3-
require_relative "../lib/syntax_suggest/api"
3+
begin
4+
require_relative "../lib/syntax_suggest/api"
5+
rescue LoadError
6+
# for default gems
7+
require "syntax_suggest/api"
8+
end
49

510
SyntaxSuggest::Cli.new(
611
argv: ARGV

0 commit comments

Comments
 (0)