Chromium Code Reviews| Index: dart/lib/dartdoc/dartdoc.dart |
| diff --git a/dart/lib/dartdoc/dartdoc.dart b/dart/lib/dartdoc/dartdoc.dart |
| index 57191283f9718f3c214726e17a676fc2e7f09cf6..141ab3cbacb649e392acb586822476be9843d83c 100644 |
| --- a/dart/lib/dartdoc/dartdoc.dart |
| +++ b/dart/lib/dartdoc/dartdoc.dart |
| @@ -175,17 +175,20 @@ void copyFiles(String from, String to) { |
| */ |
| void compileScript(String compilerPath, String libDir, |
| String dartPath, String jsPath) { |
| - final process = new Process.start(compilerPath, [ |
| + onExit(int exitCode, String stdout, String stderr) { |
| + if (exitCode != 0) { |
| + print('non-zero exit code from $compilerPath'); |
|
Bob Nystrom
2012/04/23 16:03:20
Nit, but please make this a full sentence:
'Unexp
ahe
2012/04/24 10:31:02
Done.
|
| + print(stdout); |
| + print(stderr); |
| + throw 'non-zero exit code from $compilerPath'; |
| + } |
| + } |
| + |
| + print('Compiling $dartPath to $jsPath'); |
| + new Process.run(compilerPath, [ |
| '--libdir=$libDir', '--out=$jsPath', |
| '--compile-only', '--enable-type-checks', '--warnings-as-errors', |
| - dartPath]); |
| - |
| - process.stdout.pipe(stdout, close: false); |
| - |
| - process.onError = (error) { |
|
ahe
2012/04/24 10:31:02
After talking to sgjesse about this, I restored th
|
| - print('Failed to compile $dartPath with $compilerPath. Error:'); |
| - print(error); |
| - }; |
| + dartPath], null, onExit); |
| } |
| class Dartdoc { |