www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Should `dub run` prints its output to STDERR?

reply Ky-Anh Huynh <saigon example.net> writes:
When I execute a program thanks to dub, `dub` also prints its 
information to STDOUT:

[code]
$ dub run dusybox:jq -- .status "           1" < 
/home/pi/df/acces.log |head -10
Building package dusybox:jq in /home/pi/projects/icy/dusybox/
Performing "debug" build using dmd for x86_64.
dusybox:jq ~master: target for configuration "application" is up 
to date.
To force a rebuild of up-to-date targets, run again with --force.
Running ./dusybox_jq .status            1
403            1
403            1
302            1
[/code]

Those first 5 lines are generated by `dub` and written to STDOUT. 
This is a bit inconvenient if I want to use my program output as 
input for another program.

We may have the same program if `dub` writes to STDERR. But it's 
more sense that a pipe program uses STDIN for input. This is a 
popular behavior I think.

Is there any option other than redirecting which depends on shell 
support?

Thanks,
Sep 08
parent reply =?UTF-8?Q?Ali_=c3=87ehreli?= <acehreli yahoo.com> writes:
On 09/08/2017 09:51 PM, Ky-Anh Huynh wrote:
 When I execute a program thanks to dub, `dub` also prints its
 information to STDOUT:
Try dub's --quiet command line switch. Ali
Sep 08
next sibling parent Ky-Anh Huynh <saigon example.net> writes:
On Saturday, 9 September 2017 at 05:58:59 UTC, Ali Çehreli wrote:
 On 09/08/2017 09:51 PM, Ky-Anh Huynh wrote:
 When I execute a program thanks to dub, `dub` also prints its
 information to STDOUT:
Try dub's --quiet command line switch. Ali
That's perfect. Thanks a lot.
Sep 09
prev sibling parent Martin Tschierschke <mt smartdolphin.de> writes:
On Saturday, 9 September 2017 at 05:58:59 UTC, Ali Çehreli wrote:
 On 09/08/2017 09:51 PM, Ky-Anh Huynh wrote:
 When I execute a program thanks to dub, `dub` also prints its
 information to STDOUT:
Try dub's --quiet command line switch. Ali
Can I configure this also in dub.json (dub.sdl)? Specially --parallel switch?
Sep 09