Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CocoaPods swap promise.all for reduce to avoid git locking problem #2169

Merged
merged 1 commit into from
Mar 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions plugins/cocoapods/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,12 @@ export default class CocoapodsPlugin implements IPlugin {
await this.publishPodSpec(podLogLevel);

// Reset changes to podspec file since it doesn't need to be committed
await Promise.all(
this.paths.map((path) => execPromise("git", ["checkout", path]))
);
await this.paths.reduce(
(promise, path) => promise.then(async () => {
await execPromise("git", ["checkout", path])
}),
Promise.resolve()
)

return canaryVersion;
}
Expand Down