Repository navigation
Commit 2483da2
authored
[flutter_tools] Do not treat 'daemon' argument as daemon command in logger initialization (flutter#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 flutter#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`1 parent 53643c2 commit 2483da2
3 files changed
Lines changed: 22 additions & 2 deletions
File tree
- packages/flutter_tools
- lib
- test
- general.shard
- integration.shard
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
| 97 | + | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
279 | 297 | | |
0 commit comments