Bail and log why if door 'io' config is bad

This commit is contained in:
Bryan Ashby
2022-09-08 21:31:01 -06:00
parent 62bcb8055a
commit 2a0ae05c45
2 changed files with 7 additions and 1 deletions

View File

@@ -58,6 +58,8 @@ module.exports = class Door {
if ('socket' === this.io && !this.sockServer) {
return cb(Errors.UnexpectedState('Socket server is not running'));
} else if ('stdio' !== this.io) {
return cb(Errors.Invalid(`"${this.io}" is not a valid io type!`));
}
const cwd = exeInfo.cwd || paths.dirname(exeInfo.cmd);