Skip to content

Commit

Permalink
[cordova-cli #578] plugin/remove.js: don't stomp opts.cli_variables i…
Browse files Browse the repository at this point in the history
…n removePluginFromPlatform() (#913)

* plugin/remove.js: don't stomp opts.cli_variables in removePluginFromPlatform()

* undo change to line spacing
  • Loading branch information
sebastian-onlea authored Oct 23, 2024
1 parent 36284e1 commit 3381125
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/cordova/plugin/remove.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3381125

Please sign in to comment.