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

Cordova CLI should ignore hidden folders as plugins when installing a platform

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 8.0.0
    • Fix Version/s: None
    • Component/s: cordova-cli
    • Labels:
      None

      Description

      If you have `plugins` under version control, you get an error like this:

      λ cordova platform add android@7.1.1
      Using cordova-fetch for cordova-android@7.1.1
      Adding android project...
      Creating Cordova project for the Android platform:
              Path: platforms\android
              Package: de.janpiotrowski.zaehlerstand
              Name: Z_hlerstand
              Activity: MainActivity
              Android target: android-27
      Android project created with cordova-android@7.1.1
      Android Studio project detected
      Android Studio project detected
      (node:12852) UnhandledPromiseRejectionWarning: CordovaError: Cannot find plugin.xml for plugin ".git". Please try adding it again.
          at new PluginInfo (C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-common\src\PluginInfo\PluginInfo.js:367:15)
          at PluginInfoProvider.get (C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-common\src\PluginInfo\PluginInfoProvider.js:35:32)
          at Function.runInstall (C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-lib\src\plugman\install.js:271:41)
          at C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-lib\src\plugman\install.js:79:35
          at _fulfilled (C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54)
          at self.promiseDispatch.done (C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
          at Promise.promise.promiseDispatch (C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:749:13)
          at C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:810:14
          at flush (C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:108:17)
          at _combinedTickCallback (internal/process/next_tick.js:131:7)
      (node:12852) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
      (node:12852) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
      

      It would make sense for this process to ignore hidden folders or get the list of plugins from somewhere else but the filesystem.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Sujan12 Jan Piotrowski (janpio)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: