Commit e98acc7d authored by Zachary Anderson's avatar Zachary Anderson Committed by Todd Volkert

[flutter_tool] Print version info on a no-op upgrade. (#46109)

parent 6d848ebf
...@@ -63,7 +63,6 @@ class UpgradeCommand extends FlutterCommand { ...@@ -63,7 +63,6 @@ class UpgradeCommand extends FlutterCommand {
} }
} }
@visibleForTesting @visibleForTesting
class UpgradeCommandRunner { class UpgradeCommandRunner {
Future<FlutterCommandResult> runCommand( Future<FlutterCommandResult> runCommand(
...@@ -120,7 +119,8 @@ class UpgradeCommandRunner { ...@@ -120,7 +119,8 @@ class UpgradeCommandRunner {
final bool alreadyUpToDate = await attemptFastForward(flutterVersion); final bool alreadyUpToDate = await attemptFastForward(flutterVersion);
if (alreadyUpToDate) { if (alreadyUpToDate) {
// If the upgrade was a no op, then do not continue with the second half. // If the upgrade was a no op, then do not continue with the second half.
printTrace('Flutter is already up to date on channel ${flutterVersion.channel}'); printStatus('Flutter is already up to date on channel ${flutterVersion.channel}');
printStatus('$flutterVersion');
} else { } else {
await flutterUpgradeContinue(); await flutterUpgradeContinue();
} }
......
...@@ -140,6 +140,7 @@ void main() { ...@@ -140,6 +140,7 @@ void main() {
environment: anyNamed('environment'), environment: anyNamed('environment'),
workingDirectory: anyNamed('workingDirectory'), workingDirectory: anyNamed('workingDirectory'),
)); ));
expect(testLogger.statusText, contains('Flutter is already up to date'));
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
ProcessManager: () => processManager, ProcessManager: () => processManager,
Platform: () => fakePlatform, Platform: () => fakePlatform,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment