Closed sebastian-onlea closed 1 week ago
Thank you for the PR.
We generally do not make back ports releases. If applicable, the PR should target the master
branch so that when merged it will be included in our next release. I'm not sure if GitHub allows you to re-target a PR, it may need to be closed and recreated.
Will do! I've been working on the released version 11 and I wasn't sure whether to target the patch branch or master. Thanks.
Platforms affected
CLI - adding and removing plugins with differing required variables per platform (e.g. cordova-plugin-googleplus )
Motivation and Context
resolves apache/cordova-cli#578 :
cordova plugin rm plugin-package --variable "IOS_ONLY_REQUIRED_VARIABLE=variable-value"
will fail if the project includes e.g. both android and ios platforms.Description
In
removePluginFromPlatform()
, at cordova/plugin/remove.js:105,opts.cli_variables
is destructively reassigned to the result ofmergeVariables()
. As mergeVariables() selects only keys specified for a specific platform, this can result in CLI-specified values being lost before the platform that requires them is processed.In the change, instead call
uninstallPlatform()
with a copy ofopts
that includes the platform-specificmergeVariables()
result.Testing
npm run test
)npm link
ingChecklist
(platform)
if this change only applies to one platform (e.g.(android)
)