From a639727acf9eaf37a1d84d1a659be88262be2d15 Mon Sep 17 00:00:00 2001 From: Geordie J Date: Tue, 20 Aug 2024 12:45:38 +0200 Subject: [PATCH] Put an upper bound on "**/Podfile" search depth --- packages/cli-platform-apple/src/config/findAllPodfilePaths.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/cli-platform-apple/src/config/findAllPodfilePaths.ts b/packages/cli-platform-apple/src/config/findAllPodfilePaths.ts index 3e3255742..6562a810e 100644 --- a/packages/cli-platform-apple/src/config/findAllPodfilePaths.ts +++ b/packages/cli-platform-apple/src/config/findAllPodfilePaths.ts @@ -15,5 +15,9 @@ export default function findAllPodfilePaths(cwd: string) { return glob.sync('**/Podfile', { cwd: unixifyPaths(cwd), ignore: GLOB_EXCLUDE_PATTERN, + // Stop unbounded globbing and infinite loops for projects + // with deeply nested subdirectories. The most likely result + // is `ios/Podfile`, so this depth should be plenty: + deep: 10, }); }