apache / apache/cordova-cli

Need to specify variables when uninstalling a plugin

Open
#446 1 comment 10 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
967
Forks
344
Avg merge
8h 41m
Merged PRs (30d)
9

Description

# Bug Report

## Problem

### What is expected to happen?

I can uninstall the plugin without having to specify variables.

### What does actually happen?

I have this plugins that requires 2 variables to install:

```
E:\Projects\throwaway\cordovaPlatformVerificationPlugin (helloworld@1.0.0)
λ cordova plugin add E:\Projects\Cordova\cordova-paramedic\spec\platform-verification-plugin\tests --variable PLATFORM=foo --variable VERSION=bar Plugin "platform-verification-plugin.tests" already installed on browser.
Adding platform-verification-plugin.tests to package.json
```

defined via `plugin.xml`:
```


```

But when I try to uninstall it, I also have to supply the variables:
```
E:\Projects\throwaway\cordovaPlatformVerificationPlugin (helloworld@1.0.0)
λ cordova plugin rm platform-verification-plugin.tests
Variable(s) missing (use: --variable PLATFORM=value --variable VERSION=value).
```

With the variable supplied I can uninstall the plugin:

```
E:\Projects\throwaway\cordovaPlatformVerificationPlugin (helloworld@1.0.0)
λ cordova plugin rm platform-verification-plugin.tests --variable PLATFORM=foo --variable VERSION=bar
Uninstalling 1 dependent plugins.
Uninstalling cordova-plugin-device from browser
js-module uninstall called : plugins\cordova-plugin-device\www\device.js
js-module uninstall called : plugins\cordova-plugin-device\src\browser\DeviceProxy.js
Uninstalling platform-verification-plugin.tests from browser
js-module uninstall called : plugins\platform-verification-plugin.tests\tests.js
Removing "platform-verification-plugin.tests"
Removing platform-verification-plugin.tests from package.json
```

## Information

### Command or Code
`cordova plugin rm platform-verification-plugin.tests`

### Version information

```
λ cordova info
cordova-lib@9.0.1 with:
cordova-common@3.1.0
cordova-create@2.0.0
cordova-fetch@2.0.1
cordova-serve@3.0.0

Environment:
OS: win32
Node: v12.3.1
npm: 6.9.0
```

## Checklist

- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `cordova plugin rm platform-verification-plugin.tests` with the plugin.xml preferences PLATFORM and VERSION, then trace the plugin-removal command. Done means the plugin uninstalls without requiring those variables, while installation still supports them.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.