cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-11284) Telemetry: Log platform/plugin subcommands
Date Fri, 20 May 2016 21:14:12 GMT

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

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

Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-cli/pull/253#discussion_r64108237
  
    --- Diff: src/cli.js ---
    @@ -143,20 +143,27 @@ module.exports = function (inputArgs, cb) {
             return cli(inputArgs);
         }).then(function () {
             if (shouldCollectTelemetry && !isTelemetryCmd) {
    -            telemetry.track(cmd, 'successful');
    +            telemetry.track(cmd, subcommand, 'successful');
             }
             // call cb with error as arg if something failed
             cb(null);
         }).fail(function (err) {
             if (shouldCollectTelemetry && !isTelemetryCmd) {
    -            telemetry.track(cmd, 'unsuccessful');
    +            telemetry.track(cmd, subcommand, 'unsuccessful');
             }
             // call cb with error as arg if something failed
             cb(err);
             throw err;
         }).done();
     };
     
    +function getSubCommand(args, cmd) {
    +    if(cmd === 'platform' || cmd === 'platforms' || cmd === 'plugin' || cmd === 'plugins'
|| cmd === 'telemetry') {
    +        return args[3]; // e.g: args='node cordova platform rm ios', 'node cordova telemetry
on'
    +    }
    +    return "";
    --- End diff --
    
    Instead of empty string - you might want to return null


> Telemetry: Log platform/plugin subcommands
> ------------------------------------------
>
>                 Key: CB-11284
>                 URL: https://issues.apache.org/jira/browse/CB-11284
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: CLI
>            Reporter: Omar Mefire
>            Assignee: Omar Mefire
>




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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message