From c209f84b8ab160fa711916b753f2b983daa21b9c Mon Sep 17 00:00:00 2001 From: Peter Ebden Date: Mon, 7 Nov 2016 14:58:40 +0000 Subject: [PATCH] Fix --mutex (#1717) * Fix --mutex, pass specifier through to repeated promise calls. * Minor grammar fix --- src/cli/index.js | 6 +++--- src/reporters/lang/en.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cli/index.js b/src/cli/index.js index e4b0745d65..685c7bb817 100644 --- a/src/cli/index.js +++ b/src/cli/index.js @@ -244,7 +244,7 @@ const runEventuallyWithFile = (mutexFilename: ?string, isFirstTime?: boolean): P reporter.warn(reporter.lang('waitingInstance')); } setTimeout(() => { - ok(runEventuallyWithFile()); + ok(runEventuallyWithFile(mutexFilename, isFirstTime)); }, 200); // do not starve the CPU } else { onDeath(() => { @@ -278,13 +278,13 @@ const runEventuallyWithNetwork = (mutexPort: ?string): Promise => { // the server has informed us he's going to die soon™. socket.unref(); // let it die process.nextTick(() => { - ok(runEventuallyWithNetwork()); + ok(runEventuallyWithNetwork(mutexPort)); }); }) .on('error', () => { // No server to listen to ? :O let's retry to become the next server then. process.nextTick(() => { - ok(runEventuallyWithNetwork()); + ok(runEventuallyWithNetwork(mutexPort)); }); }); }); diff --git a/src/reporters/lang/en.js b/src/reporters/lang/en.js index a5228c1fd8..0bca72f2f6 100644 --- a/src/reporters/lang/en.js +++ b/src/reporters/lang/en.js @@ -16,7 +16,7 @@ const messages = { answer: 'Answer?', usage: 'Usage', installCommandRenamed: '`install` has been replaced with `add` to add new dependencies. Run $0 instead.', - waitingInstance: 'Waiting until the other yarn instance finish', + waitingInstance: 'Waiting for the other yarn instance to finish', offlineRetrying: 'There appears to be trouble with your network connection. Retrying...', clearedCache: 'Cleared cache.', packWroteTarball: 'Wrote tarball to $0.',