Skip to content

Commit

Permalink
A gem executable should not use require_relative
Browse files Browse the repository at this point in the history
Otherwise it makes incorrect assumption about RubyGems layout.
  • Loading branch information
eregon authored Oct 17, 2024
1 parent 88d3522 commit 04585d8
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions exe/syntax_suggest
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#!/usr/bin/env ruby

begin
require_relative "../lib/syntax_suggest/api"
rescue LoadError
# for default gems
require "syntax_suggest/api"
end
require "syntax_suggest/api"

SyntaxSuggest::Cli.new(
argv: ARGV
Expand Down

0 comments on commit 04585d8

Please sign in to comment.