fix a few WIP parser bugs

This commit is contained in:
AJ ONeal 2018-09-25 00:54:51 -06:00
parent c3e9bbaa5a
commit 3e0c977511
1 changed files with 12 additions and 8 deletions

View File

@ -328,6 +328,7 @@ function parseConfig(err, text) {
console.info(verstr.join(' '));
}
if (err) {
if ('ENOENT' === err.code || 'ECONNREFUSED' === err.code) {
console.error("Either the telebit service was not already (and could not be started) or its socket could not be written to.");
console.error(err);
@ -337,7 +338,9 @@ function parseConfig(err, text) {
} else {
console.error(err);
}
if (err) { process.exit(101); return; }
process.exit(101);
return;
}
//
// check for init first, before anything else
@ -428,6 +431,7 @@ function parseConfig(err, text) {
RC.request({ service: argv[0], method: 'POST', data: argv.slice(1) }, handleRemoteRequest(argv[0]));
return true;
}
help();
return true;
})) {
return;