mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Improve error messages when build fails
Instead of failing with a cryptic error message about app.flx, we now fail with an explicit message about the compiler. Releated to #865
This commit is contained in:
parent
a9f0044e29
commit
8eb9763569
@ -164,7 +164,8 @@ class BuildCommand extends FlutterCommand {
|
||||
outputPath: localBundlePath,
|
||||
mainPath: mainPath
|
||||
);
|
||||
onBundleAvailable(localBundlePath);
|
||||
if (result == 0)
|
||||
onBundleAvailable(localBundlePath);
|
||||
} finally {
|
||||
tempDir.deleteSync(recursive: true);
|
||||
}
|
||||
@ -195,8 +196,10 @@ class BuildCommand extends FlutterCommand {
|
||||
// In a precompiled snapshot, the instruction buffer contains script
|
||||
// content equivalents
|
||||
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;
|
||||
}
|
||||
|
||||
archive.addFile(_createSnapshotFile(snapshotPath));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user