From 54f4c240272cc59402490b10cf7b3877e5f70d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Mon, 13 Aug 2018 13:26:14 +0100 Subject: [PATCH] Makes the execution synchronous --- src/cli/commands/workspaces.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/cli/commands/workspaces.js b/src/cli/commands/workspaces.js index 9fea55fb4b..616cffe041 100644 --- a/src/cli/commands/workspaces.js +++ b/src/cli/commands/workspaces.js @@ -76,19 +76,15 @@ export async function runScript(config: Config, reporter: Reporter, flags: Objec try { const [_, ...rest] = flags.originalArgs || []; - const childProcesses = []; for (const workspaceName of Object.keys(workspaces)) { const {loc} = workspaces[workspaceName]; - childProcesses.push( - child.spawn(NODE_BIN_PATH, [YARN_BIN_PATH, ...rest], { - stdio: 'inherit', - cwd: loc, - }), - ); - } - await Promise.all(childProcesses); + await child.spawn(NODE_BIN_PATH, [YARN_BIN_PATH, ...rest], { + stdio: 'inherit', + cwd: loc, + }); + } } catch (err) { throw err; }