Miscellaneous cleanups (#6813)

- [x] Return the reload message even when paused at a breakpoint.
- [x] Only initialize context members if they aren't already initialized.
This commit is contained in:
John McCutchan
2016-11-10 15:28:19 -08:00
committed by GitHub
parent ca5e1f3f23
commit f172f0675d
3 changed files with 9 additions and 10 deletions

View File

@@ -82,10 +82,14 @@ Future<Null> main(List<String> args) async {
return Chain.capture/*<Future<Null>>*/(() async {
// Initialize globals.
context[Logger] = new StdoutLogger();
context[DeviceManager] = new DeviceManager();
context[DevFSConfig] = new DevFSConfig();
Doctor.initGlobal();
if (context[Logger] == null)
context[Logger] = new StdoutLogger();
if (context[DeviceManager] == null)
context[DeviceManager] = new DeviceManager();
if (context[DevFSConfig] == null)
context[DevFSConfig] = new DevFSConfig();
if (context[Doctor] == null)
context[Doctor] = new Doctor();
dynamic result = await runner.run(args);
_exit(result is int ? result : 1);