From 7ec31a7c53baa3a2b5bf0fbaf1d0ebe798175772 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Thu, 31 Mar 2011 19:51:22 -0400 Subject: [PATCH] If no directory is passed to --watch, default to Resources --- Tools/nib2cib/main.j | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Tools/nib2cib/main.j b/Tools/nib2cib/main.j index 8f31a3780..ded3aa7de 100644 --- a/Tools/nib2cib/main.j +++ b/Tools/nib2cib/main.j @@ -46,12 +46,20 @@ var parser = new (require("narwhal/args").Parser)(), function main(args) { - var options = parseOptions(args); + try + { + var options = parseOptions(args); - if (options.watch) - watch(options); - else - convert(options); + if (options.watch) + watch(options); + else + convert(options); + } + catch (anException) + { + CPLog.fatal([anException reason]); + OS.exit(1); + } } function convert(options, inputFile) @@ -124,7 +132,7 @@ function watch(options) // Turn on info messages setLogLevel(1); - directory = FILE.canonical(options.args[0] || "."); + directory = FILE.canonical(options.args[0] || "Resources"); if (!FILE.isDirectory(directory)) fail("Cannot find the directory: " + directory);