Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-6124

cordova plugin remove x fails if there's a plugin whose directory was deleted

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.4.0
    • None
    • cordova-plugman
    • None

    Description

      $ cordova plugin remove org.apache.cordova.battery-status
      Uninstalling org.apache.cordova.battery-status from android
      Error: ENOENT, no such file or directory 'mobilespec/plugins/com.blackberry.pim.lib/plugin.xml'
      at Object.fs.openSync (fs.js:427:18)
      at Object.fs.readFileSync (fs.js:284:15)
      at Object.module.exports.parseElementtreeSync (cordova-plugman/src/util/xml-helpers.js:119:27)
      at cordova-plugman/src/util/dependencies.js:22:35
      at Array.forEach (native)
      at Object.module.exports.generate_dependency_info (cordova-plugman/src/util/dependencies.js:21:45)
      at Object.module.exports.dependents (cordova-plugman/src/util/dependencies.js:38:46)
      at runUninstall (cordova-plugman/src/uninstall.js:105:35)
      at Function.module.exports.uninstallPlatform (cordova-plugman/src/uninstall.js:39:12)
      at cordova-cli/src/plugin.js:164:58
      mobilespec $ ls plugins/com.blackberry.pim.lib
      ls: plugins/com.blackberry.pim.lib: No such file or directory

      Expected results: Just because a plugin doesn't exist doesn't mean you can't build a graph. Especially if the goal is to delete stuff.

      Note: I'm only using cordova plugin remove to delete things (and cordova plugin add to add), so whomever either added it incompletely or failed to properly remove it is partially to blame, but my goal right now is safe handling of bad states, not investigating how I got to the bad state.

      Attachments

        Activity

          People

            jsoref Josh Soref
            jsoref Josh Soref
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: