From bcb12a69f434d3b9b72cacb71ce1d29f3ce20b69 Mon Sep 17 00:00:00 2001 From: mlorbetske Date: Tue, 30 May 2017 22:42:24 -0700 Subject: [PATCH] Fix flow from the refactoring --- src/dotnet/commands/dotnet-run/RunCommand.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/dotnet/commands/dotnet-run/RunCommand.cs b/src/dotnet/commands/dotnet-run/RunCommand.cs index 98fbfedc6..3401f1ac1 100644 --- a/src/dotnet/commands/dotnet-run/RunCommand.cs +++ b/src/dotnet/commands/dotnet-run/RunCommand.cs @@ -37,7 +37,12 @@ namespace Microsoft.DotNet.Tools.Run } ICommand runCommand = GetRunCommand(); - ApplyLaunchProfileSettingsIfNeeded(ref runCommand); + int launchSettingsApplicationResult = ApplyLaunchProfileSettingsIfNeeded(ref runCommand); + + if (launchSettingsApplicationResult != 0) + { + return launchSettingsApplicationResult; + } return runCommand .Execute() @@ -80,7 +85,7 @@ namespace Microsoft.DotNet.Tools.Run ); } - private void ApplyLaunchProfileSettingsIfNeeded(ref ICommand runCommand) + private int ApplyLaunchProfileSettingsIfNeeded(ref ICommand runCommand) { if (UseLaunchProfile) { @@ -114,6 +119,8 @@ namespace Microsoft.DotNet.Tools.Run Reporter.Error.WriteLine(LocalizableStrings.RunCommandExceptionCouldNotLocateALaunchSettingsFile.Bold().Red()); } } + + return 0; } private void EnsureProjectIsBuilt()