Skip to content

Commit 1acc45e

Browse files
Better fix - not adding linebreaks when not needed
1 parent c38cca1 commit 1acc45e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/services/cocoapods-service.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,11 @@ export class CocoaPodsService implements ICocoaPodsService {
8989
if (index !== -1) {
9090
finalPodfileContent = finalPodfileContent.replace(postInstallHookStart, `${postInstallHookStart}${postInstallHookContent}`);
9191
} else {
92+
if (finalPodfileContent.length > 0) {
93+
finalPodfileContent += `${EOL}${EOL}`;
94+
}
9295
const postInstallHook = `${postInstallHookStart}${postInstallHookContent}end`;
93-
finalPodfileContent = `${finalPodfileContent}${EOL}${EOL}${postInstallHook}`;
96+
finalPodfileContent = `${finalPodfileContent}${postInstallHook}`;
9497
}
9598
}
9699

0 commit comments

Comments
 (0)