diff --git a/plugins/cocoapods/src/index.ts b/plugins/cocoapods/src/index.ts index 75209b695..b2022be06 100644 --- a/plugins/cocoapods/src/index.ts +++ b/plugins/cocoapods/src/index.ts @@ -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; }