Skip to content

Commit

Permalink
slightly improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
matthid committed Sep 24, 2017
1 parent 8e8f916 commit b66c411
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/Fake.Core.Target/Target.fs
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,10 @@ module Target =
let targets = errors |> Seq.map (fun e -> e.Target) |> Seq.distinct
let targetStr = String.Join(", ", targets)
AggregateException(
sprintf "Targets '%s' failed." targetStr,
(if errors.Length = 1 then
sprintf "Target '%s' failed." targetStr
else
sprintf "Targets '%s' failed." targetStr),
errors |> Seq.map (fun e -> e.Error))
|> raise

Expand Down

0 comments on commit b66c411

Please sign in to comment.