diff --git a/src/app/defaults.ts b/src/app/defaults.ts index 4b8cc9f8..4a35aeef 100644 --- a/src/app/defaults.ts +++ b/src/app/defaults.ts @@ -3,6 +3,7 @@ import * as chalk from "chalk"; export const configurationErrorEventName: string = "configuration-error-generator-office"; export const copyFilesErrorEventName: string = "copy-files-error-generator-office"; export const installDependenciesErrorEventName = "install-dependencies-error-generator-office"; +export const postInstallHintsErrorEventName = "post-install-hints-error-generator-office"; export const promptSelectionstEventName: string = "prompt-selections-generator-office"; export const promptSelectionsErrorEventName: string = "prompt-selections-error-generator-office"; export const usageDataProjectName: string = "generator-office"; diff --git a/src/app/index.ts b/src/app/index.ts index bb3705c4..23a67357 100755 --- a/src/app/index.ts +++ b/src/app/index.ts @@ -248,15 +248,13 @@ module.exports = class extends yo { if (this.options['skip-install']) { this.installDependencies({ npm: false, - bower: false, - callback: this._postInstallHints.bind(this) + bower: false }); } else { this.installDependencies({ npm: true, - bower: false, - callback: this._postInstallHints.bind(this) + bower: false }); } } catch (err) { @@ -265,6 +263,16 @@ module.exports = class extends yo { } } + end(): void { + if (!this.options['test']) { + try { + this._postInstallHints(); + } catch (err) { + usageDataObject.reportError(defaults.postInstallHintsErrorEventName, new Error('Exit Error: ' + err)); + } + } + } + _configureProject(answerForProjectType, answerForScriptType, answerForHost, answerForName, isManifestProject, isExcelFunctionsProject): void { try { this.project = {