<commit_before>module Fastlane
  module Actions
    class SentryUploadDsymAction < Action
      def self.run(params)
        check_sentry_cli!

        # Params - API
        url = params[:url]
        auth_token = params[:auth_token]
        api_key = params[:api_key]
        org = params[:org_slug]
        project = params[:project_slug]

        # Params - dSYM
        dsym_path = params[:dsym_path]
        dsym_paths = params[:dsym_paths] || []

        has_api_key = !api_key.to_s.empty?
        has_auth_token = !auth_token.to_s.empty?

        # Will fail if none or both authentication methods are provided
        if !has_api_key && !has_auth_token
          UI.user_error!("No API key or authentication token found for SentryAction given, pass using `api_key: 'key'` or `auth_token: 'token'`")
        elsif has_api_key && has_auth_token
          UI.user_error!("Both API key and authentication token found for SentryAction given, please only give one")
        elsif has_api_key && !has_auth_token
          UI.deprecated("Please consider switching to auth_token ... api_key will be removed in the future")
        end

        ENV['SENTRY_API_KEY'] = api_key unless api_key.to_s.empty?
        ENV['SENTRY_AUTH_TOKEN'] = auth_token unless auth_token.to_s.empty?
        ENV['SENTRY_URL'] = url unless url.to_s.empty?
        ENV['SENTRY_LOG_LEVEL'] = 'info' if $verbose

        # Verify dsym(s)
        dsym_paths += [dsym_path]
        dsym_paths = dsym_paths.map { |path| File.absolute_path(path) }
        dsym_paths.each do |path|
          UI.user_error!("dSYM does not exist at path: #{path}") unless File.exists? path
        end

        UI.success("sentry-cli #{Fastlane::Sentry::CLI_VERSION} installed!")<commit_msg>Fix #5 nil dsym_path<commit_after>module Fastlane
  module Actions
    class SentryUploadDsymAction < Action
      def self.run(params)
        check_sentry_cli!

        # Params - API
        url = params[:url]
        auth_token = params[:auth_token]
        api_key = params[:api_key]
        org = params[:org_slug]
        project = params[:project_slug]

        # Params - dSYM
        dsym_path = params[:dsym_path]
        dsym_paths = params[:dsym_paths] || []

        has_api_key = !api_key.to_s.empty?
        has_auth_token = !auth_token.to_s.empty?

        # Will fail if none or both authentication methods are provided
        if !has_api_key && !has_auth_token
          UI.user_error!("No API key or authentication token found for SentryAction given, pass using `api_key: 'key'` or `auth_token: 'token'`")
        elsif has_api_key && has_auth_token
          UI.user_error!("Both API key and authentication token found for SentryAction given, please only give one")
        elsif has_api_key && !has_auth_token
          UI.deprecated("Please consider switching to auth_token ... api_key will be removed in the future")
        end

        ENV['SENTRY_API_KEY'] = api_key unless api_key.to_s.empty?
        ENV['SENTRY_AUTH_TOKEN'] = auth_token unless auth_token.to_s.empty?
        ENV['SENTRY_URL'] = url unless url.to_s.empty?
        ENV['SENTRY_LOG_LEVEL'] = 'info' if $verbose

        # Verify dsym(s)
        dsym_paths += [dsym_path] unless dsym_path.nil?
        dsym_paths = dsym_paths.map { |path| File.absolute_path(path) }
        dsym_paths.each do |path|
          UI.user_error!("dSYM does not exist at path: #{path}") unless File.exists? path
        end

        UI.success("sentry-cli #{Fastlane::Sentry::CLI_VERSION} installed!")
{'fraction_non_alphanumeric': 0.09923230025589991, 'fraction_numerical': 0.0002843332385555871, 'mean_word_length': 2.74653887113951, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3868449', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1112, 'n_words': 276}