cozy / cozy-dev

Archived - Please use https://github.com/CPatchane/create-cozy-app
http://cozy.io
Other
17 stars 12 forks source link

Reverted: use stream piping instead of printit for spawned commands #54

Closed jsilvestre closed 9 years ago

jsilvestre commented 9 years ago

util.print is very good at outputting stdout and stderr. I tried various things with printit, but none of them were successful. I always ended up with broken lines, unreadable logs (all on the same lines), or a mix a both. This is very noticeable during cozy-dev vm:update since it runs a bash script, where we don't control the output (i.e. of vagrant, npm, and pip).

I suggest we take this change, but we open an issue to make sure we do solve the problem in the best way. For instance, we could run each commands from NodeJS so we could show logs to the user, without showing it every single line of it.

frankrousseau commented 9 years ago

I think it's not the printer that leads to problems. You should simply pipe the outputs.

jsilvestre commented 9 years ago

Well obviously printit does (or does not) do something that makes it not working. I'm switching to standard piping, because it's more standard.