def execute_action_command(command: nil)
      command_return = @command_executor.execute(command: command, target_object: nil)
      ## probably need to just return Strings, or ready_for_next with object isn't String
      return_object = command_return.return_value
      return_value_type = command_return.return_value_type
      closure_arg = command_return.closure_argument_value

      return_object = return_value_processor.prepare_object(
        return_value: return_object,
        return_value_type: return_value_type
      )

      if closure_arg.nil?
        closure_arg = closure_arg.to_s
      else
        closure_arg = return_value_processor.prepare_object(
          return_value: closure_arg,
          return_value_type: :string # always assume string for closure error_callback
        )
      end

      Thread.current[:exception] = nil

      payload = {
        payload: {
          status: "ready_for_next",
          return_object: return_object,
          closure_argument_value: closure_arg
        }
      }
      return JSON.generate(payload)
    rescue StandardError => e
      Thread.current[:exception] = e

      exception_array = []
      exception_array << "#{e.class}:"
      exception_array << e.backtrace

      while e.respond_to?("cause") && (e = e.cause)
        exception_array << "cause: #{e.class}"
        exception_array << e.backtrace
      end

      payload = {
        payload: {
          status: "failure",
          failure_information: exception_array.flatten
        }
      }
      return JSON.generate(payload)
    end
def execute_action_command(command: nil)
      command_return = @command_executor.execute(command: command, target_object: nil)
      ## probably need to just return Strings, or ready_for_next with object isn't String
      return_object = command_return.return_value
      return_value_type = command_return.return_value_type
      closure_arg = command_return.closure_argument_value

      return_object = return_value_processor.prepare_object(
        return_value: return_object,
        return_value_type: return_value_type
      )

      if closure_arg.nil?
        closure_arg = closure_arg.to_s
      else
        closure_arg = return_value_processor.prepare_object(
          return_value: closure_arg,
          return_value_type: :string # always assume string for closure error_callback
        )
      end

      Thread.current[:exception] = nil

      payload = {
        payload: {
          status: "ready_for_next",
          return_object: return_object,
          closure_argument_value: closure_arg
        }
      }
      return JSON.generate(payload)
    rescue StandardError => e
      Thread.current[:exception] = e

      exception_array = []
      exception_array << "#{e.class}:"
      exception_array << e.backtrace

      while e.respond_to?("cause") && (e = e.cause)
        exception_array << "cause: #{e.class}"
        exception_array << e.backtrace
      end

      payload = {
        payload: {
          status: "failure",
          failure_information: exception_array.flatten
        }
      }
      return JSON.generate(payload)
    end
execute fastlane action command