SIGN IN SIGN UP

[flutter_tools] Do not treat 'daemon' argument as daemon command in logger initialization (#191442)

## Description

`executable.dart` checked `args.contains('daemon')` and
`args.contains(WidgetPreviewCommand.kWidgetPreview)` to configure the
logger. When running commands where 'daemon' was supplied as an argument
(such as `flutter create daemon`), this caused `NotifyingLogger` to be
initialized instead of standard loggers, silencing command output.

Use `commandName` from `findCommandName(args)` to accurately detect if
the command is `daemon` or `widget-preview`.

## Related Issues
Fixes https://github.com/flutter/flutter/issues/75876

## Tests
- Added unit test to
`packages/flutter_tools/test/general.shard/executable_test.dart`
- Added integration test to
`packages/flutter_tools/test/integration.shard/command_output_test.dart`
B
Ben Konyi committed
2483da25236e9a53550025b2b918a57d3ac5070d
Parent: 53643c2
Committed by GitHub <noreply@github.com> on 8/24/2026, 5:31:10 PM