From 07768ef29d47d6ae11ea5c84d795b5db0f0935ba Mon Sep 17 00:00:00 2001 From: derberg Date: Wed, 29 Nov 2023 12:26:10 +0100 Subject: [PATCH] fix: bring back git verification --- lib/generator.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/generator.js b/lib/generator.js index 0203f3a64..10efa7d69 100644 --- a/lib/generator.js +++ b/lib/generator.js @@ -168,7 +168,7 @@ class Generator { */ async generate(asyncapiDocument, parseOptions = {}) { this.validateAsyncAPIDocument(asyncapiDocument); - this.setupOutput(); + await this.setupOutput(); this.setLogLevel(); await this.installAndSetupTemplate(); @@ -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"'); }