Exit from subjake if the subjake returns non zero status code. Don't exit in the compiler (required for building in Atlas to not kill the process)

This commit is contained in:
Ross Boucher committed 2009-11-19 14:48:18 -08:00
1 parent 44e0879224
commit 0639f4b00f
2 files changed
+4 -3

No files matched your search

@@ -105,7 +105,7 @@ function compileWithResolvedFlags(aFilePath, objjcFlags, gccFlags)
" on preprocessed line number "+e.lineNumber+"\n"+
"\t"+lines.slice(Math.max(0, e.lineNumber - 1 - PAD), e.lineNumber+PAD).join("\n\t"));
OS.exit(1);
throw e;
}
}
+3 -2
View File
@@ -203,8 +203,9 @@ global.subjake = function(/*Array<String>*/ directories, /*String*/ aTaskName)
{
if (FILE.isDirectory(aDirectory) && FILE.isFile(FILE.join(aDirectory, "Jakefile")))
{
OS.system("cd " + aDirectory + " && " + serializedENV() + " " + ARGV[0] + " " + aTaskName);
//rake abort if ($? != 0)
var returnCode = OS.system("cd " + aDirectory + " && " + serializedENV() + " " + ARGV[0] + " " + aTaskName);
if (returnCode)
OS.exit(returnCode);
}
else
print("warning: subjake missing: " + aDirectory + " (this is not necessarily an error, " + aDirectory + " may be optional)");