spasm-ng icon indicating copy to clipboard operation
spasm-ng copied to clipboard

Support quiet output

Open tari opened this issue 4 years ago • 7 comments

A -Q command line option or something to suppress some output would be helpful for scripting; in particular the "Pass one..." messages and such.

I have some code that's running spasm as a subprocess, and without a way to turn those messages off I can't easily ensure I only get my own code's output.

tari avatar Jul 27 '20 02:07 tari

Can't you just pipe the output to /dev/null?

Eeems avatar Jul 27 '20 03:07 Eeems

Not easily and portably! (It's not a shell script and it needs to run on platforms that aren't unixy.)

tari avatar Jul 27 '20 05:07 tari

I'd be interested to know what language you are using for this that doesn't have the ability to easily capture subprocess output in a portable mechanism.

Eeems avatar Jul 27 '20 14:07 Eeems

It's not that I can't capture output, but I don't care about it so don't want to capture it. (I'm using Rust.)

tari avatar Jul 28 '20 09:07 tari

Does .stdout(Stdio::null()) not work?

calc84maniac avatar Jul 28 '20 12:07 calc84maniac

It does; I managed to overlook it? Though I recall I wanted to redirect stdout to stderr so that output could still appear as well.

In any case a "quiet" flag still seems generally useful.

tari avatar Jul 28 '20 21:07 tari

Not opposed to adding this feature - I think this would mainly add a flag that suppresses warnings and pass outputs, but still allow for errors to be emitted as part of the build process, likely to stderr. (Maybe warning suppression should fall under a different flag, with the --quiet flag implying the warning suppression flag... not sure.)

alberthdev avatar Aug 03 '20 03:08 alberthdev