yarnpkg/yarn

Multiple sub-scripts do not output progressively

Open

#4 423 ouverte le 12 sept. 2017

Voir sur GitHub
 (8 commentaires) (0 réactions) (0 assignés)JavaScript (2 731 forks)batch import
cat-featuregood first issuehelp wantedtriaged

Métriques du dépôt

Stars
 (41 514 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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 npm@5.4 which is what I would say is "expected":

$ npm run lint:all

> example@1.0.0 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

Guide contributeur