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

Hooks not being executed on windows platform

Agile BoardAttach filesAttach ScreenshotAdd voteVotersWatch issueWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            guirip guirip

            Dates

              Created:
              Updated:

              Issue deployment