Skip to content

Commit

Permalink
Fix CLI error message (#1137)
Browse files Browse the repository at this point in the history
  • Loading branch information
josefpihrt authored Jul 27, 2023
1 parent da508a5 commit 32b2b11
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/CommandLine/Commands/MSBuildWorkspaceCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ public async Task<CommandStatus> ExecuteAsync(IEnumerable<string> paths, string
try
{
result = await ExecuteAsync(path, workspace, cancellationToken);

if (result is null)
{
status = CommandStatus.Fail;
continue;
}
}
catch (ProjectOrSolutionLoadException ex)
{
Expand Down Expand Up @@ -176,7 +182,7 @@ private bool VerifyProjectNames(Solution solution)
if (!projectNames.Any(f => string.Equals(f.Name, value.Name, StringComparison.Ordinal))
&& !projectNames.Any(f => string.Equals(f.NameWithoutMoniker, value.NameWithoutMoniker, StringComparison.Ordinal)))
{
WriteLine($"Project '{value}' does not exist.", Verbosity.Quiet);
WriteLine($"Project '{value.Name}' does not exist.", ConsoleColors.Yellow, Verbosity.Quiet);
return false;
}
}
Expand Down

0 comments on commit 32b2b11

Please sign in to comment.