From e7715073efcca86ebbc2d4d57019cd80dc7039ba Mon Sep 17 00:00:00 2001 From: Matthias Dittrich Date: Mon, 19 Mar 2018 12:24:21 +0100 Subject: [PATCH] fix team foundation tag closing --- .../Fake.BuildServer.TeamFoundation/TeamFoundation.fs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app/Fake.BuildServer.TeamFoundation/TeamFoundation.fs b/src/app/Fake.BuildServer.TeamFoundation/TeamFoundation.fs index 0e59e597f74..b7461507034 100644 --- a/src/app/Fake.BuildServer.TeamFoundation/TeamFoundation.fs +++ b/src/app/Fake.BuildServer.TeamFoundation/TeamFoundation.fs @@ -99,14 +99,17 @@ module TeamFoundation = let parentId = match openTags with | [] -> None - | (id) :: _ -> Some id + | (_, id) :: _ -> Some id + openTags <- (tag,id) :: openTags createLogDetail id parentId tag.Type tag.Name order descr - | TraceData.CloseTag (_, time) -> + | TraceData.CloseTag (tag, time) -> ignore time let id, rest = match openTags with - | [] -> failwithf "Cannot close tag, as it was not opened before!" - | (id) :: rest -> id, rest + | [] -> failwithf "Cannot close tag, as it was not opened before! (Expected %A)" tag + | (savedTag, id) :: rest -> + ignore savedTag // TODO: Check if tag = savedTag + id, rest openTags <- rest setLogDetailFinished id Succeeded | TraceData.ImportData (typ, path) ->