Skip to content

Commit d6eaa49

Browse files
committed
fix(apple): fix EEXISTS error when running pod install
1 parent 0951cf5 commit d6eaa49

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

packages/app/ios/app.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,11 @@ export function generateProject(
170170
configureBuildSchemes(appConfig, targetPlatform, xcodeprojDst, fs);
171171

172172
// Link source files
173+
const opts = { throwIfNoEntry: false };
173174
const srcDirs = ["ReactTestApp", "ReactTestAppTests", "ReactTestAppUITests"];
174175
for (const file of srcDirs) {
175176
const symlink = path.join(destination, file);
176-
if (fs.existsSync(symlink)) {
177+
if (fs.lstatSync(symlink, opts)) {
177178
rm_r(symlink, fs);
178179
}
179180
fs.symlinkSync(projectPath(file, targetPlatform), symlink);
@@ -182,7 +183,7 @@ export function generateProject(
182183
// Shared code lives in `ios/ReactTestApp/`
183184
if (targetPlatform !== "ios") {
184185
const shared = path.join(destination, "Shared");
185-
if (!fs.existsSync(shared)) {
186+
if (!fs.lstatSync(shared, opts)) {
186187
const source = new URL("ReactTestApp", import.meta.url);
187188
fs.symlinkSync(fileURLToPath(source), shared);
188189
}

0 commit comments

Comments
 (0)