Github user daserge commented on a diff in the pull request:
https://github.com/apache/cordova-cli/pull/251#discussion_r63492190
--- 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)) {
--- End diff --
`nightly` versions include SHA so they should be different.
Although it might make sense just to use `usingPrerelease` flag in this
check (there is a little probability of SHAs match).
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]