Verified Commit 0f68ab1b authored by Hercules Merscher's avatar Hercules Merscher 🌴
Browse files

fix: Pathname already resolves absolute/relative paths

parent 0b69151a
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -39,15 +39,8 @@ module Labkit
      #
      # @param directory [String, Pathname, nil] Custom directory path
      # @return [Pathname] Resolved directory path
      def resolve_directory_path(directory)
        if directory
          # Expand relative paths from the current working directory
          path = Pathname.new(directory)
          path.absolute? ? path : Pathname.new(Dir.pwd).join(path)
        else
          # Default to config/covered_experiences relative to the calling application's root
          Pathname.new(Dir.pwd).join('config', 'covered_experiences')
        end
      def resolve_directory_path(directory = File.join("config", "covered_experiences"))
        Pathname.new(Dir.pwd).join(directory)
      end

      def directory_exists?(directory_path)