Exit with error if conversion fails.

This commit is contained in:
Aparajita Fishman committed 2011-07-05 16:08:22 -07:00
1 parent 9038b7cfa9
commit eaa51835ef
1 file changed
+7 -2
+7 -2
View File
@@ -75,6 +75,8 @@ var FILE = require("file"),
- (void)run
{
var exitValue = 0;
try
{
var options = [self parseOptionsFromArgs:commandLineArgs];
@@ -84,13 +86,16 @@ var FILE = require("file"),
if (options.watch)
[self watchWithOptions:options];
else
[self convertWithOptions:options inputFile:nil];
if (![self convertWithOptions:options inputFile:nil])
exitValue = 2;
}
catch (anException)
{
CPLog.fatal([self exceptionReason:anException]);
OS.exit(1);
exitValue = 1;
}
OS.exit(exitValue);
}
- (BOOL)convertWithOptions:(JSObject)options inputFile:(CPString)inputFile