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