node-cmd icon indicating copy to clipboard operation
node-cmd copied to clipboard

Silence log output?

Open kokujin opened this issue 8 years ago • 8 comments

Is it possible to stop node-cmd from outputting the scripts that it runs? Thanks

kokujin avatar Jul 13 '16 13:07 kokujin

I have not seen this behavior, can you provide a short example? Thanks!

RIAEvangelist avatar Jul 14 '16 22:07 RIAEvangelist

no response so closing.

RIAEvangelist avatar Dec 19 '16 23:12 RIAEvangelist

maybe something like cmd.runSync('ls nonExistingDir') would also print on standard output (beside data returned by runSync )

edit: what you can do is redirect standard output or error output to /dev/null https://unix.stackexchange.com/a/82699

jirikrepl avatar Dec 29 '21 11:12 jirikrepl

OK, I'll check it out.

RIAEvangelist avatar Dec 29 '21 16:12 RIAEvangelist

The trick is making that work for linux, mac and windows.

RIAEvangelist avatar Jan 06 '22 11:01 RIAEvangelist

the other thing is that retrieving the output is a desired function of the module.

so I think the best way to get what you want would be to spin jup a child process that runs the node cmd command, or running it as a daemon.

RIAEvangelist avatar Jan 06 '22 11:01 RIAEvangelist

thoughts?

RIAEvangelist avatar Jan 06 '22 11:01 RIAEvangelist

bump*

RIAEvangelist avatar Jan 22 '22 17:01 RIAEvangelist