[dotnet-watch] Don't show false error messages (#434)
This commit is contained in:
parent
7cbb6220e4
commit
341ba98d27
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
|
|
@ -69,13 +69,13 @@ namespace Microsoft.DotNet.Watcher
|
|||
|
||||
await Task.WhenAll(processTask, fileSetTask);
|
||||
|
||||
if (processTask.Result == 0)
|
||||
if (processTask.Result != 0 && finishedTask == processTask)
|
||||
{
|
||||
_reporter.Output("Exited");
|
||||
_reporter.Error($"Exited with error code {processTask.Result}");
|
||||
}
|
||||
else
|
||||
{
|
||||
_reporter.Error($"Exited with error code {processTask.Result}");
|
||||
_reporter.Output("Exited");
|
||||
}
|
||||
|
||||
if (finishedTask == cancelledTaskSource.Task || cancellationToken.IsCancellationRequested)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests
|
|||
public async Task HasExited()
|
||||
{
|
||||
await Process.GetOutputLineAsync(ExitingMessage, DefaultMessageTimeOut);
|
||||
await Process.GetOutputLineAsync(WatchExitedMessage, DefaultMessageTimeOut);
|
||||
await Process.GetOutputLineStartsWithAsync(WatchExitedMessage, DefaultMessageTimeOut);
|
||||
}
|
||||
|
||||
public async Task IsWaitingForFileChange()
|
||||
|
|
|
|||
Loading…
Reference in New Issue