diff --git a/backend/.nycrc.json b/backend/.nycrc.json index 466ed30b..598958dc 100644 --- a/backend/.nycrc.json +++ b/backend/.nycrc.json @@ -10,6 +10,6 @@ "check-coverage": true, "branches": 79.8, "lines": 86, - "functions": 81, - "statements": 86 + "functions": 80.3, + "statements": 85.6 } diff --git a/backend/package.json b/backend/package.json index b28f7c23..b0ca43df 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "yeoman-ui", - "version": "1.0.11", + "version": "1.0.12", "displayName": "Application Wizard", "publisher": "SAPOS", "author": { diff --git a/backend/src/yeomanui.ts b/backend/src/yeomanui.ts index 91c46aae..a78c8d47 100644 --- a/backend/src/yeomanui.ts +++ b/backend/src/yeomanui.ts @@ -184,6 +184,12 @@ export class YeomanUI { this.promptCount = 0; this.gen = (gen as Generator); this.gen.destinationRoot(targetFolder); + + env.on("error", error => { + env.removeAllListeners("error"); + this.onGeneratorFailure(generatorName, error); + env.emit("error", error); + }); // we cannot use new async method, "await this.gen.run()", because generators based on older versions // (for example: 2.0.5) of "yeoman-generator" do not support it this.gen.run(async (error) => {