[ 
https://issues.apache.org/jira/browse/CB-8455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15063762#comment-15063762
 ] 

ASF GitHub Bot commented on CB-8455:
------------------------------------

Github user vladimir-kotikov commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/353#discussion_r48008986
  
    --- Diff: cordova-lib/src/hooks/HooksRunner.js ---
    @@ -87,6 +93,12 @@ module.exports = HooksRunner;
      */
     module.exports.fire = globalFire;
     function globalFire(hook, opts) {
    +    if (isHookDisabled(opts, hook)) {
    +        /* jshint -W064 */
    --- End diff --
    
    Just a minor nit: do we need for this ignores? We don't have neither 
'strict mode' nor JSHint `newcap` option enabled, so this is probably just a 
no-op.


> suppress hooks with command line options
> ----------------------------------------
>
>                 Key: CB-8455
>                 URL: https://issues.apache.org/jira/browse/CB-8455
>             Project: Apache Cordova
>          Issue Type: New Feature
>          Components: CLI, CordovaLib
>            Reporter: Byoungro So
>            Assignee: Byoungro So
>              Labels: cordova-6.0.0
>
> Some Cordova users need a way to prevent hooks from being executed for 
> various reasons. One example is a security issue.
> A new CLI option "--nohooks" can be introduced for those Cordova users.
> This option takes a string as the pattern for disabling hooks.
> For example, 
> {code}cordova plugin --nohooks before_plugin_add {code}
> {code}cordova platform --nohooks before*{code}
> {code}cordova prepare --nohooks before_prepare --nohooks after*{code}
> {code}cordova build --nohooks .{code}
> --nohooks can be repeated for multiple hook patterns.
> All pattern strings are automatically converted to RegExp.
> The last example disables all hooks.
> We need this feature in Intel XDK.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to