I have package.json scripts like this:
"scripts": {
"lint:all": "yarn run lint:project-a && yarn run lint:project-b && yarn run lint:project-c",
"lint:project-a": "cd project-a && yarn run lint",
"lint:project-b": "cd project-b && yarn run lint",
"lint:project-c": "cd project-c && yarn run lint"
}
This is the output from [email protected] which is what I would say is "expected":
$ npm run lint:all
> [email protected] lint:all c:\dev\example
> yarn run lint:project-a && yarn run lint:project-b && yarn run lint:project-c
yarn run v1.0.1
$ cd project-a && yarn run lint
Done in 8.34s.
yarn run v1.0.1
$ cd project-b && yarn run lint
Done in 8.26s.
yarn run v1.0.1
$ cd project-c && yarn run lint
Done in 10.57s.
Yarn produces this:
$ yarn run lint:all
yarn run v1.0.1
$ yarn run lint:project-a && yarn run lint:project-b && yarn run lint:project-c
Done in 48.05s.
and the wait is quite long. Is this expected behavior or possibly a bug?
Node 8.4.0, Yarn 1.0.1, Windows 10
Yes it is expected since yarn passes YARN_SILENT=1 down to sub scripts to silence its extra output.
So it still runs everything, just not in a verbose manner.
Is there a switch like --no-silent as the "header" of a sub script is actually useful for identifying to which the output belongs to?
@borekb unfortunately not :( That said may be this is something we should support?
I wouldn't complain :)
@borekb how about you submit a PR then? 馃槈
In all honesty, I won't be able to do that anytime soon but will keep it in mind. Thanks!
@borekb @BYK
To clarify where would the --no-silent be passed? Would it be similar to this?
"lint:project-a": "cd project-a && yarn run lint --no-silent"
For now the workaround is to set YARN_SILENT=0, however #4615 is looking at alternatives.