diff --git a/Bonsai.Configuration/ConsoleBootstrapper.cs b/Bonsai.Configuration/ConsoleBootstrapper.cs index e076d26e..66ec1796 100644 --- a/Bonsai.Configuration/ConsoleBootstrapper.cs +++ b/Bonsai.Configuration/ConsoleBootstrapper.cs @@ -1,6 +1,4 @@ using Bonsai.NuGet; -using System; -using System.Threading.Tasks; namespace Bonsai.Configuration { @@ -12,15 +10,5 @@ public ConsoleBootstrapper(string path) PackageManager.Logger = ConsoleLogger.Default; PackageManager.RequiringLicenseAcceptance += (sender, e) => e.LicenseAccepted = true; } - - protected override async Task RunPackageOperationAsync(Func operationFactory) - { - try { await operationFactory(); } - catch (Exception ex) - { - PackageManager.Logger.LogError(ex.ToString()); - throw; - } - } } } diff --git a/Bonsai/Program.cs b/Bonsai/Program.cs index 43fc19e3..8f2737d4 100644 --- a/Bonsai/Program.cs +++ b/Bonsai/Program.cs @@ -174,7 +174,8 @@ internal static int Main(string[] args) try { bootstrapper.RunAsync(Launcher.ProjectFramework, packageConfiguration, editorPath, editorPackageName).Wait(); } catch (AggregateException ex) { - Console.Error.WriteLine(ex); + var error = ex.InnerExceptions.Count == 1 ? ex.InnerExceptions[0] : ex; + Console.Error.WriteLine(error); return ErrorExitCode; }