Skip to content

Make the welcome message output to stderr if --machine#184819

Merged
auto-submit[bot] merged 4 commits into
flutter:masterfrom
sigurdm:machine_to_stderr
May 4, 2026
Merged

Make the welcome message output to stderr if --machine#184819
auto-submit[bot] merged 4 commits into
flutter:masterfrom
sigurdm:machine_to_stderr

Conversation

@sigurdm

@sigurdm sigurdm commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Fixes #54014.

@github-actions github-actions Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Apr 9, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces an isMachine property to the Logger interface and its implementations to distinguish between human-readable and machine-readable output. The MachineOutputLogger is updated to set this property to true. The Usage.printWelcome method is modified to direct license terms to stderr when the logger is identified as machine-oriented, and to stdout otherwise. Corresponding tests have been added to verify this behavior. A review comment suggests using globals.logger.printStatus for consistency in the else block of the printWelcome method.

Comment on lines +322 to 323
logFunction(messenger.licenseTerms, emphasis: true);
_printedWelcome = true;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with the if block, which uses globals.logger directly, it would be clearer to also use globals.logger.printStatus here instead of the globals.printStatus shorthand.

        globals.logger.printStatus('');
        globals.logger.printStatus(messenger.licenseTerms, emphasis: true);

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

Labels

CICD Run CI/CD tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Welcome to Flutter" and "Waiting for lock" messages break --machine commands

2 participants