Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple sub-scripts do not output progressively #4423

Open
borekb opened this issue Sep 12, 2017 · 8 comments
Open

Multiple sub-scripts do not output progressively #4423

borekb opened this issue Sep 12, 2017 · 8 comments

Comments

@borekb
Copy link

borekb commented Sep 12, 2017

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

@BYK
Copy link
Member

BYK commented Sep 12, 2017

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.

@borekb
Copy link
Author

borekb commented Sep 12, 2017

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?

@BYK
Copy link
Member

BYK commented Sep 12, 2017

@borekb unfortunately not :( That said may be this is something we should support?

@borekb
Copy link
Author

borekb commented Sep 13, 2017

I wouldn't complain :)

@BYK
Copy link
Member

BYK commented Sep 13, 2017

@borekb how about you submit a PR then? 😉

@borekb
Copy link
Author

borekb commented Sep 13, 2017

In all honesty, I won't be able to do that anytime soon but will keep it in mind. Thanks!

@sreeramjayan
Copy link

@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"

@edmorley
Copy link
Contributor

For now the workaround is to set YARN_SILENT=0, however #4615 is looking at alternatives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants