apache / apache/cordova-node-xcode

addBuildPhase keeps adding phases when they already exist

Open
#110 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
217
Forks
102
Avg merge
2d 3h
Merged PRs (30d)
6

Description

This is the build script line

```
xcodeProject.addBuildPhase(
[], 'PBXShellScriptBuildPhase', 'Configure Crashlytics', undefined, options
).buildPhase;
fs.writeFileSync(xcodeProjectPath, xcodeProject.writeSync());
$logger.trace('Xcode project written');
} else {
$logger.error(xcodeProjectPath + ' is missing.');
reject();
return;
}
```

So I guess everytime the CLI build runs it adds a NEW "Configure Crashlytics" to the build phase. Eventually my machine just outright died because the script was running hundreds of times.

Is there maybe a way before this I can check to see if it exists first before just adding it again?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.