Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8777E2009A8 for ; Tue, 17 May 2016 11:40:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8616F1609F5; Tue, 17 May 2016 09:40:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CF78B1609AE for ; Tue, 17 May 2016 11:40:12 +0200 (CEST) Received: (qmail 6642 invoked by uid 500); 17 May 2016 09:40:12 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 6630 invoked by uid 99); 17 May 2016 09:40:11 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 May 2016 09:40:11 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 970D8DFC13; Tue, 17 May 2016 09:40:11 +0000 (UTC) From: daserge To: dev@cordova.apache.org Reply-To: dev@cordova.apache.org References: In-Reply-To: Subject: [GitHub] cordova-cli pull request: CB-11262 Add a warning about prerelease ... Content-Type: text/plain Message-Id: <20160517094011.970D8DFC13@git1-us-west.apache.org> Date: Tue, 17 May 2016 09:40:11 +0000 (UTC) archived-at: Tue, 17 May 2016 09:40:13 -0000 Github user daserge commented on a diff in the pull request: https://github.com/apache/cordova-cli/pull/251#discussion_r63492417 --- 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 -- Logger is being initialized below that's why I'm not using it. I agree regarding the `warn` visibility though - will try to refactor this, thanks! --- 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