null+****@clear*****
null+****@clear*****
2012年 8月 6日 (月) 13:47:39 JST
SHIMODA Hiroshi 2012-08-06 13:47:39 +0900 (Mon, 06 Aug 2012) New Revision: 11991417bc9a64363e4d9e2d2aef0138549ae36b https://github.com/groonga/gcs/commit/11991417bc9a64363e4d9e2d2aef0138549ae36b Log: Exit with error code by cs-commands Modified files: bin/cs-configure-fields bin/cs-create-domain Modified: bin/cs-configure-fields (+6 -6) =================================================================== --- bin/cs-configure-fields 2012-08-06 13:14:26 +0900 (f15744f) +++ bin/cs-configure-fields 2012-08-06 13:47:39 +0900 (686bc96) @@ -26,19 +26,19 @@ program if (!program.domainName) { console.log('You must specify the domain name.'); - return false; + return process.exit(1); } var context = commandLine.getContext(program.databasePath); var domain = new commandLine.Domain(program.domainName, context); if (!domain.exists()) { console.log('You must specify an existing domain name.'); - return false; + return process.exit(1); } if (!program.name) { console.log('You must specify the field name.'); - return false; + return process.exit(1); } var field = domain.getIndexField(program.name); @@ -46,18 +46,18 @@ var field = domain.getIndexField(program.name); if (program.delete) { if (!field.exists()) { console.log('You must specify an existing field.'); - return false; + return process.exit(1); } field.deleteSync(); console.log('Updated 1 Index Field:'); } else { if (!program.type) { console.log('You must specify the field type.'); - return false; + return process.exit(1); } if (field.exists()) { console.log('You must specify not-existing field name.'); - return false; + return process.exit(1); } field.type = program.type; field.createSync(); Modified: bin/cs-create-domain (+2 -2) =================================================================== --- bin/cs-create-domain 2012-08-06 13:14:26 +0900 (9088a6d) +++ bin/cs-create-domain 2012-08-06 13:47:39 +0900 (1b639ff) @@ -17,7 +17,7 @@ program if (!program.domainName) { console.log('You must specify the domain name.'); - return false; + return process.exit(1); } console.log('Creating domain [' + program.domainName + ']'); @@ -26,7 +26,7 @@ var context = commandLine.getContext(program.databasePath); var domain = new commandLine.Domain(program.domainName, context); if (domain.exists()) { console.log('The domain [' + program.domainName + '] already exists.'); - return false; + return process.exit(1); } domain.createSync(); -------------- next part -------------- HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...Download