Unverified Commit a92110a2 authored by Alexander Aprelev's avatar Alexander Aprelev Committed by GitHub

Clean up build directory before copying freshly produced build artifacts over. (#14081)

parent a29d723c
......@@ -356,6 +356,11 @@ Future<XcodeBuildResult> buildXcodeProject({
// Copy app folder to a place where other tools can find it without knowing
// the BuildInfo.
outputDir = actualOutputDir.replaceFirst('/$configuration-', '/');
if (fs.isDirectorySync(outputDir)) {
// Previous output directory might have incompatible artifacts
// (for example, kernel binary files produced from previous `--preview-dart-2` run).
fs.directory(outputDir).deleteSync(recursive: true);
}
copyDirectorySync(fs.directory(actualOutputDir), fs.directory(outputDir));
}
return new XcodeBuildResult(success: true, output: outputDir);
......
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