run

in lib/gdk/command/debug_info.rb [14:47]


      def run(_ = [])
        GDK::Output.puts separator
        GDK::Output.info review_prompt
        GDK::Output.puts separator

        GDK::Output.puts "Operating system: #{os_name}"
        GDK::Output.puts "Architecture: #{arch}"
        GDK::Output.puts "Ruby version: #{ruby_version}"
        GDK::Output.puts "GDK version: #{gdk_version}"

        GDK::Output.puts
        GDK::Output.puts 'Environment:'

        environment_hash = ENV.each_with_object({}) do |(variable, value), result|
          next unless matches_regex?(variable)

          result[variable] = value
        end

        ConfigRedactor.redact(environment_hash.merge(env_vars)).each do |var, content|
          GDK::Output.puts "#{var}=#{content}"
        end

        if gdk_yml_exists?
          GDK::Output.puts
          GDK::Output.puts 'GDK configuration:'
          GDK::Output.puts gdk_yml
        end

        GDK::Output.puts separator

        true
      end