CB-14099 osx: Fixed Resolve Config Path for OSX #32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Platforms affected
OSX
What does this PR do?
Updates the Resolve Config Path for OSX.
I have identified that the initial build was successful but the consecutive builds fail because it updated the incorrect
config.xml
file.I was able to narrow down this issue coming from the
resolveConfigFilePath
method. This method currently handles special cases for Android, Ubuntu, and iOS. For all other platforms, it would fall back to glob for the config.xml. This is what was happens for OSX.When building for the first time, you have installed a fresh copy of the OSX platform.
At this time, when globbing, it will find the correct config.xml file located in
/.tests/<APP_NAME>/platforms/osx/<APP_NAME>/config.xml
.In the consecutive build, when globbing, it finds and updates the incorrect config.xml file. The file it finds is:
/.tests/osx/<APP_NAME>/platforms/osx/build/<APP_NAME>.app/Contents/Resources/config.xml
This is because of the folder/file order structure and globbing nature. Since this file was created after the first build (build history), it happens to find this file first.
What testing has been done on this change?
I also followed the reported issue steps:
cordova-osx@master
with modifiedpackage.json
to usecordova-common#CB-14099
with my fix.Checklist