Travis logs lose color and censor word "test"

since some time ago travis replaces all occurrences of test with [secure] and lose most color, but only in branch master which has 3 environment variables from repository settings for github-pages deployment

travis repo

PS: i cant track down exactly when it started, but it got noticeable when i switched from mocha to jest (because jest shows all names of the test files)

It means that one of the secure environment variables matches that text. There is no way for Travis CI to detect the semantics of the string, so we replace any occurrence of these secrets.

1 Like

deleting 2 of the 3 env variables solved the test to [secure] issue, but color is still lost (only in branch master) which means it isnt a problem from jest, right?

See ANSI colors in console does not work anymore for the loss of colors.

shouldnt this be listed in the env documentation as an drawback instead of having to find this?

PS: the thing i dont understand is, filtering shouldnt affect any functionality, or should it?

I guess a fix exists somehow, I don’t see obvious direct correlation between on one side ANSI color processing that is just plain text in the end, like \u001b[0;31mMy wonderful red token\u001b[m, and then on the other side token obfuscation processing.

Isn’t it possible to just replace token without striping the ANSI syntax?

Like in \u001b[0;31m[secure]\u001b[m for example.

thanks to the last message of @BanzaiMan (and the thread he provided) i now know that the colors arnt the problem (they work), but the filtering makes it so that it isnt an TTY anymore, so colors arnt enabled by default (at least jest + nyc), so if the colors were forced it would probably still give color

but still, why should filtering disable normal functionality

Imprint