diff --git a/src/config.ts b/src/config.ts index a2c40729..f897e821 100644 --- a/src/config.ts +++ b/src/config.ts @@ -225,8 +225,10 @@ export class Config implements IConfig { this.errlog = path.join(this.cacheDir, 'error.log') this.tsconfig = await this._tsConfig() - this.commandsDir = path.join(this.root, this.pjson.dxcli.commands) - this.commandsDirTS = await this._tsPath(this.pjson.dxcli.commands) + if (this.pjson.dxcli.commands) { + this.commandsDir = path.join(this.root, this.pjson.dxcli.commands) + this.commandsDirTS = await this._tsPath(this.pjson.dxcli.commands) + } this.hooks = _.mapValues(this.pjson.dxcli.hooks || {}, h => _.castArray(h).map(h => path.join(this.root, h))) this.hooksTS = await this._hooks() if (typeof this.pjson.dxcli.plugins === 'string') { diff --git a/test/config.test.ts b/test/config.test.ts index 417db00a..8150b92e 100644 --- a/test/config.test.ts +++ b/test/config.test.ts @@ -64,7 +64,7 @@ describe('PluginConfig', () => { .add('config', testPlugin('heroku-run')) .end('heroku-run has properties', ({config}) => { expect(config.config).to.include({ - commandsDir: undefined + // commandsDir: undefined }) })