From 4d11805fb45ef2303c4236c1d18c1b36b8980fd1 Mon Sep 17 00:00:00 2001 From: AdmiringWorm Date: Wed, 22 Jul 2020 17:13:19 +0200 Subject: [PATCH] fix(project): fix generator exiting early when running dotnet build/restore --- src/project/index.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/project/index.ts b/src/project/index.ts index 21a2504f..ebcaf6af 100644 --- a/src/project/index.ts +++ b/src/project/index.ts @@ -152,11 +152,10 @@ export default class ProjectGenerator extends BaseGenerator { PromptNames.ProjectName )}.sln` ); - const done = this.async(); if (this.getBoolValue("build")) { - this.spawnCommand("dotnet", ["build", solutionPath]).on("close", done); + this.spawnCommandSync("dotnet", ["build", solutionPath]); } else { - this.spawnCommand("dotnet", ["restore", solutionPath]).on("close", done); + this.spawnCommandSync("dotnet", ["restore", solutionPath]); } }