Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
TCourtneyOwen committed Aug 3, 2020
2 parents bc9dbbc + 80d66d0 commit bf226e0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/app/defaults.ts
Expand Up @@ -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";
Expand Down
16 changes: 12 additions & 4 deletions src/app/index.ts
Expand Up @@ -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) {
Expand All @@ -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 = {
Expand Down

0 comments on commit bf226e0

Please sign in to comment.