From 9b3b65bd0b6cba512ffa7e05efa4b5c0fd67afa2 Mon Sep 17 00:00:00 2001 From: George Ma Date: Thu, 25 Jul 2024 10:32:56 -0400 Subject: [PATCH] Fix binstubs --- exe/erb_lint | 3 ++- exe/erblint | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/exe/erb_lint b/exe/erb_lint index 4cff68c9..ce9491df 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 6ca68b2a..05dac9cf 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)