Skip to content

Commit

Permalink
Adds a note of the workspace name when running commands in all worksp…
Browse files Browse the repository at this point in the history
…aces (yarnpkg#7722)

* Adds a note of the workspace name when running commands in all workspaces

* Update CHANGELOG.md
  • Loading branch information
orta authored and VincentBailly committed Jun 10, 2020
1 parent 6d7696e commit b420a22
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,10 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa

## Master

- Prints workspace names with `yarn workspaces` (silence with `-s`)

[#7722](https://github.com/yarnpkg/yarn/pull/7722) - [**Orta**](https://twitter.com/orta)

- Implements `yarn init --install berry`

[#7723](https://github.com/yarnpkg/yarn/pull/7723) - [**Maël Nison**](https://twitter.com/arcanis)
Expand Down
3 changes: 2 additions & 1 deletion src/cli/commands/workspaces.js
Expand Up @@ -10,6 +10,7 @@ import {NODE_BIN_PATH, YARN_BIN_PATH} from '../../constants';

const invariant = require('invariant');
const path = require('path');
const os = require('os');
const semver = require('semver');

export function hasWrapper(commander: Object, args: Array<string>): boolean {
Expand Down Expand Up @@ -79,7 +80,7 @@ export async function runScript(config: Config, reporter: Reporter, flags: Objec

for (const workspaceName of Object.keys(workspaces)) {
const {loc} = workspaces[workspaceName];

reporter.log(`${os.EOL}> ${workspaceName}`);
await child.spawn(NODE_BIN_PATH, [YARN_BIN_PATH, ...rest], {
stdio: 'inherit',
cwd: loc,
Expand Down

0 comments on commit b420a22

Please sign in to comment.