Skip to content

Fix newlines in msg "changes detected..."#53

Open
lightmare wants to merge 2 commits intotravis-ci:bashfrom
lightmare:fix-changes-newlines
Open

Fix newlines in msg "changes detected..."#53
lightmare wants to merge 2 commits intotravis-ci:bashfrom
lightmare:fix-changes-newlines

Conversation

@lightmare
Copy link

There are currently two literal \n (backslash+n, not newlines) in the "changes detected" message: one on the first line, followed immediately by a changed file's name; another on the last line, after the last changed file name.

See for example: https://travis-ci.org/mapnik/mapnik/jobs/617797520#L2189-L2211

This PR changes the output such that the initial "changes detected..." line is printed separately, in green as before, and then the head of DIFF_FILE without coloring (I don't think it was actually intended to dump the whole thing in green; as you can see in the example above, color didn't persist across multiple lines).

This PR kinda voids #49 (which I think is a bad idea) and consequently #50.

Admittedly, #49 would fix this issue in its way, but at the same time create another: it would make the function msg clunky for printing anything coming from the outside (such as a list of user-created files). And #50 clearly shows that'd lead to leaning toothpick syndrome.

Also, highlight only the first line of the message.
DIFF_FILE dump need not be colorized.
wc outputs count without file name if none are given.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant