{"action":"opened","issue":{"url":"https://api.github.com/repos/strongloop/node-foreman/issues/129","repository_url":"https://api.github.com/repos/strongloop/node-foreman","labels_url":"https://api.github.com/repos/strongloop/node-foreman/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/node-foreman/issues/129/comments","events_url":"https://api.github.com/repos/strongloop/node-foreman/issues/129/events","html_url":"https://github.com/strongloop/node-foreman/issues/129","id":174585186,"number":129,"title":"Raw output adds extra linefeeds (sometimes)","user":{"login":"intervalia","id":1587937,"avatar_url":"https://avatars.githubusercontent.com/u/1587937?v=3","gravatar_id":"","url":"https://api.github.com/users/intervalia","html_url":"https://github.com/intervalia","followers_url":"https://api.github.com/users/intervalia/followers","following_url":"https://api.github.com/users/intervalia/following{/other_user}","gists_url":"https://api.github.com/users/intervalia/gists{/gist_id}","starred_url":"https://api.github.com/users/intervalia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intervalia/subscriptions","organizations_url":"https://api.github.com/users/intervalia/orgs","repos_url":"https://api.github.com/users/intervalia/repos","events_url":"https://api.github.com/users/intervalia/events{/privacy}","received_events_url":"https://api.github.com/users/intervalia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-01T17:50:29Z","updated_at":"2016-09-01T17:50:29Z","closed_at":null,"body":"When using the `--raw` option the output seen on screen sometimes includes extra linefeeds.\r\n\r\nThe reason for this is that in our code (In the child process) we use `console.log`, etc. And these functions automatically add a linefeed at the end of the output.\r\n\r\nYour code takes the stream from child process stdout and stderr and then sends it to its stdout using `console.log` which, in turn, adds another linefeed.\r\n\r\nAt first I tried a PR that would remove the linefeed at the end of the string if the string ended with a linefeed. That might work but I am not sure it will always work.\r\n\r\nInstead what if you streamed the string, when in --raw mode, directly to your stdout and con't use `console.log` (which will add a new LF)"}}
{"actor":{"display_login":"intervalia"}}