From a0d4a296e94a0238c6773ebb7ba1e18b93b694c5 Mon Sep 17 00:00:00 2001 From: Hermann Mayer Date: Mon, 13 Jan 2025 09:39:17 +0100 Subject: [PATCH] one of many Signed-off-by: Hermann Mayer --- lib/countless/configuration.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/countless/configuration.rb b/lib/countless/configuration.rb index 970e4a0..631078f 100644 --- a/lib/countless/configuration.rb +++ b/lib/countless/configuration.rb @@ -12,9 +12,9 @@ class Configuration # prefix to all relative path/file configurations. config_accessor(:base_path) do # Check for a Rake invoked call - if defined? Rake - path = Rake.application&.rakefile_location - path ||= Rake.application&.original_dir + if defined?(Rake) && Rake.respond_to?(:application) + path = Rake.application.rakefile_location + path ||= Rake.application.original_dir next path if path.present? end