Skip to content

[dartdev] Share package:unified_analytics isBot check and fix CI=false #64594

Closed

Description

@kevmoo

_isRunningOnBot in pkg/dartdev maintains a manual copy of flutter_tools's BotDetector and checks env.containsKey('CI') and env.containsKey('BOT'), which treats CI=false, CI=0, and BOT=0 as CI bots.

  • Root cause: pkg/dartdev/lib/src/unified_analytics.dart#L222-L231 checks key presence (env.containsKey('CI') and env.containsKey('BOT') after only excluding env['BOT'] == 'false'), and its comment at #L203-L206 notes that the list must be manually synced with flutter_tools.
  • Impact: Developers or scripts that set CI=false, CI=0, or BOT=0 locally have dart CLI analytics suppressed as bots, and bot-detection rules drift between dartdev and flutter_tools.

Proposed Fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-dart-cliUse area-dart-cli for issues related to the 'dart' command like tool.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions