mirror of
https://github.com/badvision/jace.git
synced 2024-11-30 23:49:52 +00:00
Remove empty files created when compilation is unsuccessful.
This commit is contained in:
parent
bff5fc6cb4
commit
3b4960c3de
@ -93,6 +93,10 @@ public class AcmeCompiler implements CompileResult<File> {
|
|||||||
String[] params = {"--outfile", compiledAsset.getAbsolutePath(), "-f", "cbm", "--maxerrors","16",sourceFile.getAbsolutePath()};
|
String[] params = {"--outfile", compiledAsset.getAbsolutePath(), "-f", "cbm", "--maxerrors","16",sourceFile.getAbsolutePath()};
|
||||||
int status = acme.run("Acme", params);
|
int status = acme.run("Acme", params);
|
||||||
successful = status == 0;
|
successful = status == 0;
|
||||||
|
if (!successful) {
|
||||||
|
compiledAsset.delete();
|
||||||
|
compiledAsset = null;
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
restoreSystemOutput();
|
restoreSystemOutput();
|
||||||
System.setProperty("user.dir", oldPath);
|
System.setProperty("user.dir", oldPath);
|
||||||
|
Loading…
Reference in New Issue
Block a user