Commit 4fa9e571 authored by Adam Barth's avatar Adam Barth

Merge pull request #872 from abarth/build_errors

Improve error messages when build fails
parents 2f973fae 8eb97635
...@@ -164,6 +164,7 @@ class BuildCommand extends FlutterCommand { ...@@ -164,6 +164,7 @@ class BuildCommand extends FlutterCommand {
outputPath: localBundlePath, outputPath: localBundlePath,
mainPath: mainPath mainPath: mainPath
); );
if (result == 0)
onBundleAvailable(localBundlePath); onBundleAvailable(localBundlePath);
} finally { } finally {
tempDir.deleteSync(recursive: true); tempDir.deleteSync(recursive: true);
...@@ -195,8 +196,10 @@ class BuildCommand extends FlutterCommand { ...@@ -195,8 +196,10 @@ class BuildCommand extends FlutterCommand {
// In a precompiled snapshot, the instruction buffer contains script // In a precompiled snapshot, the instruction buffer contains script
// content equivalents // content equivalents
int result = await toolchain.compiler.compile(mainPath: mainPath, snapshotPath: snapshotPath); int result = await toolchain.compiler.compile(mainPath: mainPath, snapshotPath: snapshotPath);
if (result != 0) if (result != 0) {
logging.severe('Failed to run the Flutter compiler. Exit code: $result');
return result; return result;
}
archive.addFile(_createSnapshotFile(snapshotPath)); archive.addFile(_createSnapshotFile(snapshotPath));
} }
......
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