Skip to content

Commit

Permalink
Fix --mutex (yarnpkg#1717)
Browse files Browse the repository at this point in the history
* Fix --mutex, pass specifier through to repeated promise calls.

* Minor grammar fix
  • Loading branch information
peterebden authored and Sebastian McKenzie committed Nov 7, 2016
1 parent 253269f commit c209f84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down Expand Up @@ -278,13 +278,13 @@ const runEventuallyWithNetwork = (mutexPort: ?string): Promise<void> => {
// 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));
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/reporters/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down

0 comments on commit c209f84

Please sign in to comment.