mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-03 19:44:22 +00:00
Exit with error if conversion fails.
This commit is contained in:
1 parent
9038b7cfa9
commit
eaa51835ef
1 file changed
+7
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user