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

CORDOVA_PLUGINS environment variable empty in hook

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.4.0
    • None
    • cordova-cli
    • Mac OS X

    Description

      Here are the steps to reproduce the bug:

      cordova create Baz
      cd Baz
      mkdir hooks/before_prepare
      echo '#!/usr/bin/env node
      console.log("CORDOVA_PLUGINS: " + process.env.CORDOVA_PLUGINS);' > hooks/before_prepare/1_env_plugins.js
      chmod +x hooks/before_prepare/1_env_plugins.js
      cordova platform add android
      cordova plugins add org.apache.cordova.network-information
      cordova plugins ls
      cordova prepare --verbose
      cordova plugins ls

      In a new project, with an Android platform (the same happens with iOS), if you try to access the CORDOVA_PLUGINS environment variable as done in the 1_env_plugins.js hook, it does contains the plugins list as the command 'cordova plugins ls' does.

      Attachments

        Activity

          People

            Unassigned Unassigned
            spechard Stéphane Péchard
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: