diff --git a/exe/erb_lint b/exe/erb_lint index 4cff68c..ce9491d 100755 --- a/exe/erb_lint +++ b/exe/erb_lint @@ -1,7 +1,8 @@ #!/usr/bin/env ruby # frozen_string_literal: true -$LOAD_PATH.unshift("#{__dir__}/../lib") +lib_path = File.expand_path("#{__dir__}/../lib") +$LOAD_PATH.unshift(lib_path) unless $LOAD_PATH.include?(lib_path) require "erb_lint/cli" diff --git a/exe/erblint b/exe/erblint index 6ca68b2..05dac9c 100755 --- a/exe/erblint +++ b/exe/erblint @@ -1,6 +1,9 @@ #!/usr/bin/env ruby # frozen_string_literal: true +lib_path = File.expand_path("#{__dir__}/../lib") +$LOAD_PATH.unshift(lib_path) unless $LOAD_PATH.include?(lib_path) + require "rainbow" warn(Rainbow("Calling `erblint` is deprecated, please call the renamed executable `erb_lint` instead.").yellow)