mirror of
https://github.com/encounter/flutter.git
synced 2026-03-30 11:10:35 -07:00
[flutter_tool] Print version info on a no-op upgrade. (#46109)
This commit is contained in:
committed by
Todd Volkert
parent
6d848ebf37
commit
e98acc7d1d
@@ -63,7 +63,6 @@ class UpgradeCommand extends FlutterCommand {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@visibleForTesting
|
||||
class UpgradeCommandRunner {
|
||||
Future<FlutterCommandResult> runCommand(
|
||||
@@ -120,7 +119,8 @@ class UpgradeCommandRunner {
|
||||
final bool alreadyUpToDate = await attemptFastForward(flutterVersion);
|
||||
if (alreadyUpToDate) {
|
||||
// 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 {
|
||||
await flutterUpgradeContinue();
|
||||
}
|
||||
|
||||
@@ -140,6 +140,7 @@ void main() {
|
||||
environment: anyNamed('environment'),
|
||||
workingDirectory: anyNamed('workingDirectory'),
|
||||
));
|
||||
expect(testLogger.statusText, contains('Flutter is already up to date'));
|
||||
}, overrides: <Type, Generator>{
|
||||
ProcessManager: () => processManager,
|
||||
Platform: () => fakePlatform,
|
||||
|
||||
Reference in New Issue
Block a user