From 364ee368c6fa788fcb06f5119d0d37a525d64320 Mon Sep 17 00:00:00 2001 From: Matthias Dittrich Date: Thu, 17 May 2018 23:12:27 +0200 Subject: [PATCH] fix output according to https://github.com/fsharp/FAKE/issues/1931 --- src/app/Fake.Core.Trace/Trace.fs | 3 +-- src/app/Fake.Core.Trace/TraceListener.fs | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app/Fake.Core.Trace/Trace.fs b/src/app/Fake.Core.Trace/Trace.fs index 1deeedd97e5..38f22d8d866 100644 --- a/src/app/Fake.Core.Trace/Trace.fs +++ b/src/app/Fake.Core.Trace/Trace.fs @@ -181,9 +181,8 @@ let setBuildNumber number = let closeAllOpenTags() = Seq.iter (fun (_, tag) -> closeTagUnsafeEx TagStatus.Failed tag) openTags.Value /// Traces the begin of a target -let traceStartTargetUnsafe name description dependencyString = +let traceStartTargetUnsafe name description (dependencyString:string) = openTagUnsafe (KnownTags.Target name) description - if not (isNull description) then tracefn " %s" description /// Traces the begin of a target [] diff --git a/src/app/Fake.Core.Trace/TraceListener.fs b/src/app/Fake.Core.Trace/TraceListener.fs index 9dc67a80a3e..49fae4340f9 100644 --- a/src/app/Fake.Core.Trace/TraceListener.fs +++ b/src/app/Fake.Core.Trace/TraceListener.fs @@ -239,6 +239,12 @@ type ConsoleTraceListener(importantMessagesToStdErr, colorMap, ansiColor) = write importantMessagesToStdErr color true text | TraceData.LogMessage(text, newLine) | TraceData.TraceMessage(text, newLine) -> write false color newLine text + | TraceData.OpenTag(KnownTags.Target _ as tag, description) -> + write false color true (sprintf "Starting %s '%s'" tag.Type tag.Name) + if not (isNull description) then + let msg = TraceData.TraceMessage("", true) + let color2 = colorMap msg + write false color2 true (sprintf " %s" description) | TraceData.OpenTag (tag, descr) -> write false color true (sprintf "Starting %s '%s': %s" tag.Type tag.Name descr) | TraceData.CloseTag (tag, time, status) ->