SamVerschueren / listr

Terminal task list
MIT License
3.28k stars 107 forks source link

A way to issue warnings #16

Open jamestalmage opened 8 years ago

jamestalmage commented 8 years ago

Swallowing all output may encourage users to ignore warnings which maybe they shouldn't (linter warnings, etc).

It would be nice if tasks were able to push any number of warnings to the output, that were not swallowed by log-update

SamVerschueren commented 8 years ago

So you mean like the observable thing we have now, but instead of overwriting that output, it just adds a new line?

jamestalmage commented 8 years ago

Yes. Not sure how that would work with subtasks. Maybe they don't collapse if a warning is made.

okonet commented 8 years ago

I ran into this with the https://github.com/okonet/lint-staged/pull/32 where I'm using spawn to log linting errors. The issue is that some linter's output is still swallowed and the Listr output displayed twice.

Is there a way to still output to stdout from my tasks? Right now it look like this:

2016-07-22 at 23 24
ben-eb commented 8 years ago

+1 from me for not swallowing error messages.

https://gitter.im/avajs/ava?at=57accc4b613cc180367b0ab5

okonet commented 8 years ago

Any update on this one? I'd like to make a decision regarding this library in https://github.com/okonet/lint-staged/pull/32 and ATM this issue is what prevents me from merging it.

SamVerschueren commented 8 years ago

@okonet Sorry for the delay on this issue. The render refactoring is currently in development and hope to ship it soon, although I also have other things on my mind lately. Can't give you an exact timeframe though...

okonet commented 8 years ago

@SamVerschueren do you think #23 can also be fixed during this refacroting?

SamVerschueren commented 8 years ago

@okonet Yes sure, see my comment in the thread.

SamVerschueren commented 8 years ago

We now have custom renderers, so it would be possible to write a renderer that does this. The current default (listr-update-renderer) just outputs like it did previously.