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

Hooks not being executed on windows platform

    XMLWordPrintableJSON

Details

    Description

      Hello

      I push a sample git project hosting a dummy cordova plugin to reproduce the issue, feel free to clone : https://bitbucket.org/guirip/cordova-plugin-hook-bug

      In this plugin I declared 4 hooks :

      • before_plugin_add
      • after_plugin_add
      • before_plugin_rm
      • after_plugin_rm

      The node script executed by the hooks simply logs the hook name.

      1. Add, then remove the plugin, you will see that only half the hooks are executed.

      > cordova plugin add ....\cordova-plugin-hook-bug --nofetch -d

      Creating a new cordova project.
      No scripts found for hook "before_plugin_add".
      Calling plugman.fetch on plugin "....\cordova-plugin-hook-bug"
      Copying plugin "....\cordova-plugin-hook-bug" => "C:\Users\Guillaume\test\testapp\plugins\cordova-plugin-hook-bug"
      Adding cordova-plugin-hook-bug to package.json
      Saved plugin info for "cordova-plugin-hook-bug" to config.xml
      Executing script found in plugin cordova-plugin-hook-bug for hook "after_plugin_add": plugins\cordova-plugin-hook-bug\testhook.js
      Hook executed: after_plugin_add

      before_plugin_add hook should be executed ?

      1. Then remove the plugin:

      > cordova plugin rm cordova-plugin-hook-bug

      Hook executed: before_plugin_rm
      Removing "cordova-plugin-hook-bug"
      Removing plugin cordova-plugin-hook-bug from config.xml file...
      Removing cordova-plugin-hook-bug from package.json

      after_plugin_rm hook should be executed ?

      Attachments

        Activity

          People

            Unassigned Unassigned
            guirip guirip
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: