Skip to content

Commit ce4a4b1

Browse files
committed
fix(publish): Checkout manifest changes serially
Dog-fooding is already paying dividends! This happened at the tail end of the v3.0.0-beta.0 publish: ``` lerna info published lerna lerna ERR! Error: Command failed: git checkout -- core/*/package.json lerna ERR! fatal: Unable to create '/Users/daniels/github/lerna/.git/index.lock': File exists. lerna ERR! lerna ERR! Another git process seems to be running in this repository, e.g. lerna ERR! an editor opened by 'git commit'. Please make sure all processes lerna ERR! are terminated then try again. If it still fails, a git process lerna ERR! may have crashed in this repository earlier: lerna ERR! remove the file manually to continue. ``` Running them serially instead of concurrently should avoid this race condition.
1 parent 349b9c7 commit ce4a4b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

commands/publish/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ class PublishCommand extends Command {
184184

185185
// reset since the package.json files are changed (by gitHead if not --canary)
186186
chain = chain.then(() =>
187-
pMap(this.repository.packageConfigs, pkgGlob =>
187+
pReduce(this.repository.packageConfigs, (_, pkgGlob) =>
188188
GitUtilities.checkoutChanges(`${pkgGlob}/package.json`, this.execOpts)
189189
)
190190
);

0 commit comments

Comments
 (0)