fix(shell/lean): only save .olean file if there are no errors

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-06-30 18:04:18 -07:00
parent eff59211ce
commit abe12b0631

View file

@ -235,7 +235,7 @@ int main(int argc, char ** argv) {
lean::interactive in(env, ios, num_threads); lean::interactive in(env, ios, num_threads);
in(std::cin, "[stdin]"); in(std::cin, "[stdin]");
} }
if (export_objects) { if (export_objects && ok) {
std::ofstream out(output, std::ofstream::binary); std::ofstream out(output, std::ofstream::binary);
export_module(out, env); export_module(out, env);
} }