erisu commented on a change in pull request #1212:
URL: https://github.com/apache/cordova-android/pull/1212#discussion_r663475616
##########
File path: spec/unit/prepare.spec.js
##########
@@ -783,6 +783,20 @@ describe('prepare', () => {
Api = rewire('../../bin/templates/cordova/Api');
prepare = rewire('../../bin/templates/cordova/lib/prepare');
+ prepare.__set__('require.resolve', (file) => {
+ if (file === 'cordova-android/framework/defaults.json') {
+ return path.resolve('./framework/defaults.json');
+ }
+ return path.resolve(file);
+ });
Review comment:
I think it is good to revert each time we prepare. User could
accidentally delete a key from the file that is needed for the builds to work.
Then we would like repopulat with the default.
It is also another way for users to quickly remove a change value back to
the default without needing to remember what was the exact default value, as it
would re-add the defaults.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]