Skip to content

Commit 3381125

Browse files
[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
1 parent 36284e1 commit 3381125

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/cordova/plugin/remove.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,11 @@ function remove (projectRoot, targets, hooksRunner, opts) {
102102

103103
return plugin_util.mergeVariables(pluginInfo, cfg, opts);
104104
}).then(function (variables) {
105-
opts.cli_variables = variables;
106-
return plugman.uninstall.uninstallPlatform(platform, platformRoot, target, pluginPath, opts)
105+
// leave opts.cli_variables untouched, so values discarded by mergeVariables()
106+
// for this platform are still available for other platforms
107+
const platformOpts = { ...opts, cli_variables: variables };
108+
109+
return plugman.uninstall.uninstallPlatform(platform, platformRoot, target, pluginPath, platformOpts)
107110
.then(function (didPrepare) {
108111
// If platform does not returned anything we'll need
109112
// to trigger a prepare after all plugins installed

0 commit comments

Comments
 (0)