check submodule validity

This commit is contained in:
Manuel Araoz 2014-03-13 15:06:13 -03:00
parent aa1511d95c
commit ee04af6362
1 changed files with 7 additions and 0 deletions

View File

@ -61,6 +61,13 @@ var createBitcore = function(opts) {
console.log('Must use either -s or -a option. For more info use the --help option');
process.exit(1);
}
if (opts.submodules) {
for (var i = 0; i<opts.submodules.length; i++) {
var sm = opts.submodules[i];
if (modules.indexOf(sm) === -1) throw new Error('Unknown submodule '+sm);
}
}
var bopts = {
pack : pack,