This is an automated email from the ASF dual-hosted git repository. dpogue pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cordova-lib.git
The following commit(s) were added to refs/heads/master by this push: new 33811252 [cordova-cli #578] plugin/remove.js: don't stomp opts.cli_variables in removePluginFromPlatform() (#913) 33811252 is described below commit 338112521a79da02c9459f391d8e0691af949b6f Author: Sebastian Hanlon <72045262+sebastian-on...@users.noreply.github.com> AuthorDate: Tue Oct 22 18:57:53 2024 -0600 [cordova-cli #578] plugin/remove.js: don't stomp opts.cli_variables in removePluginFromPlatform() (#913) * plugin/remove.js: don't stomp opts.cli_variables in removePluginFromPlatform() * undo change to line spacing --- src/cordova/plugin/remove.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cordova/plugin/remove.js b/src/cordova/plugin/remove.js index f6e05b02..1524f386 100644 --- a/src/cordova/plugin/remove.js +++ b/src/cordova/plugin/remove.js @@ -102,8 +102,11 @@ function remove (projectRoot, targets, hooksRunner, opts) { return plugin_util.mergeVariables(pluginInfo, cfg, opts); }).then(function (variables) { - opts.cli_variables = variables; - return plugman.uninstall.uninstallPlatform(platform, platformRoot, target, pluginPath, opts) + // leave opts.cli_variables untouched, so values discarded by mergeVariables() + // for this platform are still available for other platforms + const platformOpts = { ...opts, cli_variables: variables }; + + return plugman.uninstall.uninstallPlatform(platform, platformRoot, target, pluginPath, platformOpts) .then(function (didPrepare) { // If platform does not returned anything we'll need // to trigger a prepare after all plugins installed --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org