diff --git a/engine/src/flutter/frontend_server/lib/server.dart b/engine/src/flutter/frontend_server/lib/server.dart index 4828200ec9..c0085153d8 100644 --- a/engine/src/flutter/frontend_server/lib/server.dart +++ b/engine/src/flutter/frontend_server/lib/server.dart @@ -258,6 +258,13 @@ Future starter(List args, { compiler ??= new _FrontendCompiler(output, printerFactory: binaryPrinterFactory); input ??= stdin; + // Has to be a directory, that won't have any of the compiled application + // sources, so that no relative paths could show up in the kernel file. + Directory.current = Directory.systemTemp; + final Directory workingDirectory = new Directory("flutter_frontend_server"); + workingDirectory.createSync(); + Directory.current = workingDirectory; + if (options.rest.isNotEmpty) { await compiler.compile(options.rest[0], options, generator: generator); return 0;