Unverified Commit 5376e90f authored by Danny Tuppeny's avatar Danny Tuppeny Committed by GitHub

Print a message when modifying settings that you may need to reload IDE/editor (#44574)

* Print a message when modifying settings that you may need to reload IDEs/editors

* Add a test for `flutter config` output

* Remove blank line
parent 5506cc5b
......@@ -154,6 +154,8 @@ class ConfigCommand extends FlutterCommand {
if (argResults.arguments.isEmpty) {
printStatus(usage);
} else {
printStatus('\nYou may need to restart any open editors for them to read new settings.');
}
return null;
......
......@@ -155,6 +155,21 @@ void main() {
Usage: () => mockUsage,
});
testUsingContext('warns the user to reload IDE', () async {
final BufferLogger logger = context.get<Logger>();
final ConfigCommand configCommand = ConfigCommand();
final CommandRunner<void> commandRunner = createTestCommandRunner(configCommand);
await commandRunner.run(<String>[
'config',
'--enable-web'
]);
expect(logger.statusText, contains('You may need to restart any open editors'));
}, overrides: <Type, Generator>{
Usage: () => mockUsage,
});
testUsingContext('displays which config settings are available on stable', () async {
final BufferLogger logger = context.get<Logger>();
when(mockFlutterVersion.channel).thenReturn('stable');
......
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