Skip to content

Commit

Permalink
fix: bring back git verification
Browse files Browse the repository at this point in the history
  • Loading branch information
derberg committed Nov 29, 2023
1 parent 0757545 commit 07768ef
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class Generator {
*/
async generate(asyncapiDocument, parseOptions = {}) {
this.validateAsyncAPIDocument(asyncapiDocument);
this.setupOutput();
await this.setupOutput();
this.setLogLevel();

await this.installAndSetupTemplate();
Expand Down Expand Up @@ -200,13 +200,15 @@ class Generator {
*
* @example
* const generator = new Generator();
* generator.setupOutput();
*
* await generator.setupOutput();
*
* @async
*
* @throws {Error} If 'output' is set to 'string' without providing 'entrypoint'.
*/
setupOutput() {
async setupOutput() {
if (this.output === 'fs') {
this.setupFSOutput();
await this.setupFSOutput();
} else if (this.output === 'string' && this.entrypoint === undefined) {
throw new Error('Parameter entrypoint is required when using output = "string"');
}
Expand Down

0 comments on commit 07768ef

Please sign in to comment.