Skip to content

Commit b186d90

Browse files
committed
Merge pull request purescript#1118 from hdgarrood/psc-publish-warnings
psc-publish: Don't print "Warnings:" unless there are warnings
2 parents ddae724 + f13cd3e commit b186d90

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

psc-publish/ErrorsWarnings.hs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,11 @@ renderWarnings =
256256
where
257257
collectWarnings patterns warns =
258258
let boxes = mapMaybe (collectWarnings' warns) patterns
259-
in vcat
260-
[ para "Warnings:"
261-
, indented (vcat (intersperse spacer boxes))
262-
]
259+
result = vcat
260+
[ para "Warnings:"
261+
, indented (vcat (intersperse spacer boxes))
262+
]
263+
in if null boxes then nullBox else result
263264

264265
getResolutionNotVersion (ResolutionNotVersion n) = Just n
265266
getResolutionNotVersion _ = Nothing

0 commit comments

Comments
 (0)