karate icon indicating copy to clipboard operation
karate copied to clipboard

Fork and Exec have divergent behavior with line feeds

Open sabarjp opened this issue 2 years ago • 1 comments

I’ve been using karate.exec for a bit to run a custom tool and had to migrate to using karate.fork due to some additional features that fork provides. One problem is that (from what I can tell) the forked process will always append new lines to each line of buffered output, which is opposite of how exec works.

The docs do not mention this behavioral difference. Ideally this is documented, but even better would be if this could be customized behavior.

sabarjp avatar Oct 05 '23 18:10 sabarjp

@sabarjp would be great if you can attempt a PR and we happen to be in hacktoberfest - would you be able to provide a simple way to replicate ?

ptrthomas avatar Oct 06 '23 02:10 ptrthomas