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

plugman.ubuntu looks for '.' in plugin_id, while now '-' are used

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Environment:

      Ubuntu 15.10, cordova -v === 5.3.3

    • Flags:
      Important

      Description

      Line 74 in cordova/node_modules/cordova-lib/src/plugman/platforms/ubuntu.js throws an error like, null has no field '0', when trying to install plugin "cordova-plugin-file"

      Line 74 looks as follows:
      var class_name = plugin_id.match(/\.[^.]+$/)[0].substr(1);

      RegExp should be changed from dots to dashes, as new plugins have dashes in their names.

      Everything works, when line 74 is replaced with:
      var class_name = plugin_id.match(/-[^-]+$/)[0].substr(1);

        Attachments

          Activity

            People

            • Assignee:
              zaspire Maxim Ermilov
              Reporter:
              mikalai Mikalai Birukou
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: