cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vladimir-kotikov <...@git.apache.org>
Subject [GitHub] cordova-cli pull request: CB-11262 Add a warning about prerelease ...
Date Tue, 17 May 2016 09:30:54 GMT
Github user vladimir-kotikov commented on a diff in the pull request:

    https://github.com/apache/cordova-cli/pull/251#discussion_r63491154
  
    --- Diff: src/cli.js ---
    @@ -234,17 +234,24 @@ function cli(inputArgs) {
     
         var args = nopt(knownOpts, shortHands, inputArgs);
     
    -    if (args.version) {
    -        var cliVersion = require('../package').version;
    +    var cliVersion = require('../package').version;
    +    // TODO: Use semver.prerelease when it gets released
    +    var usingPrerelease = /-nightly|-dev$/.exec(cliVersion);
    +    if (args.version || usingPrerelease) {
             var libVersion = require('cordova-lib/package').version;
             var toPrint = cliVersion;
             if (cliVersion != libVersion || /-dev$/.exec(libVersion)) {
                 toPrint += ' (cordova-lib@' + libVersion + ')';
             }
    -        console.log(toPrint);
    -        return Q();
    -    }
     
    +        if (args.version) {
    +            console.log(toPrint);
    +            return Q();
    +        } else {
    +            // Show a warning and continue
    +            console.log('Warning: using prerelease version ' + toPrint);
    --- End diff --
    
    Can we use logger to print this? This would make it more visible, if we get this printed
to console with 'warn' log level.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message