Commit df675f45 authored by Todd Volkert's avatar Todd Volkert Committed by GitHub

Fix Fuchsia build (#7105)

parent 56f4fe42
......@@ -12,6 +12,7 @@ import '../lib/src/base/config.dart';
import '../lib/src/base/context.dart';
import '../lib/src/base/logger.dart';
import '../lib/src/base/os.dart';
import '../lib/src/base/process_manager.dart';
import '../lib/src/cache.dart';
import '../lib/src/flx.dart';
import '../lib/src/globals.dart';
......@@ -36,6 +37,7 @@ Future<Null> main(List<String> args) async {
executableContext.setVariable(Logger, new StdoutLogger());
executableContext.runInZone(() {
// Initialize the context with some defaults.
context.putIfAbsent(ProcessManager, () => new ProcessManager());
context.putIfAbsent(Logger, () => new StdoutLogger());
context.putIfAbsent(Cache, () => new Cache());
context.putIfAbsent(Config, () => new Config());
......
......@@ -96,6 +96,10 @@ Future<Null> main(List<String> args) async {
// Make the context current.
_executableContext.runInZone(() {
// Initialize the context with some defaults.
// NOTE: Similar lists also exist in `bin/fuchsia_builder.dart` and
// `test/src/context.dart`. If you update this list of defaults, look
// in those locations as well to see if you need a similar update there.
// Seed these context entries first since others depend on them
context.putIfAbsent(ProcessManager, () => new ProcessManager());
context.putIfAbsent(Logger, () => new StdoutLogger());
......
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