Improve plugman/uninstall.js messages #630
Currently you get an error message like this if you try to uninstall a plugin while an unsupported platform (in this case a folder called
The error message doesn't make it obvious that this is about a "platform". This PR fixes this to be more clear.
While fixing this one case, I also encountered other messages in the same file that could be more precise and include platform/plugin in the output, so I changed those as well.
Complete output from where I encountered it:
(Note that the fact that
If I would do the following commands on a new Cordova project using cordova@8, email@example.com (firstname.lastname@example.org) on my mac:
Uninstalling cordova-sqlite-storage from android Android Studio project detected Uninstalling cordova-sqlite-storage from browser js-module uninstall called : plugins/cordova-sqlite-storage/www/SQLitePlugin.js Uninstalling cordova-sqlite-storage from ios Removing "cordova-sqlite-storage" Removing plugin cordova-sqlite-storage from config.xml file... Removing cordova-sqlite-storage from package.json
I wonder if the difference is due to Windows vs mac, node/npm version, or how your project is setup?
Should I try the same thing on my Windows machine?
No need to do anything @brodybits, this is the result of another unrelated problem - it just surfaced the suboptimal error messages in this file.
(This is caused by a folder
Thanks @raphinesse, will do so tomorrow. Kinda (positively!) surprised this is covered by tests :)
Thanks @janpio for the response. Shouldn't that information be in the description, and shouldn't the JIRA number be in the title?
I gotta say that your use case sounds valid and interesting, not so surprised that CLI would have trouble with it. I think it would be nice to see a more clear description of your use case somewhere in JIRA and/or PR description.
No, as this PR does nothing to solve the problem (which is described in the JIRA issue I linked to and to which a PR fixing that issue will refer to).
This other problem just showed me that the error message here in this file could be better, so I created a PR directly to improve the outputs.
(One could create a JIRA issue "cordova-lib/plugin/uninstall message are unclear" but that is just busy work we can skip imho - the PR here contains all the relevant information on what it does and why. [I updated the PR description a bit so it actually does this])