cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jso...@apache.org
Subject [3/4] git commit: Handle: -r without a value
Date Fri, 22 Aug 2014 19:29:50 GMT
Handle: -r without a value


Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/228257ca
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/228257ca
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/228257ca

Branch: refs/heads/master
Commit: 228257ca2b6c14eb3f37070745674070f531a784
Parents: 939b5e1
Author: Josh Soref <jsoref@blackberry.com>
Authored: Thu Aug 21 14:04:19 2014 -0400
Committer: Josh Soref <jsoref@blackberry.com>
Committed: Fri Aug 22 15:28:26 2014 -0400

----------------------------------------------------------------------
 src/flagutil.js | 2 +-
 src/main.js     | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/228257ca/src/flagutil.js
----------------------------------------------------------------------
diff --git a/src/flagutil.js b/src/flagutil.js
index 72bfb2e..2c9e4b2 100644
--- a/src/flagutil.js
+++ b/src/flagutil.js
@@ -36,7 +36,7 @@ exports.registerRepoFlag = function(opt) {
 }
 
 exports.computeReposFromFlag = function(flagValue) {
-    var values = Array.isArray(flagValue) ? flagValue : [flagValue];
+    var values = flagValue === true ? [] : Array.isArray(flagValue) ? flagValue : [flagValue];
     var ret = [];
     var addedIds = {};
     function addRepo(repo) {

http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/228257ca/src/main.js
----------------------------------------------------------------------
diff --git a/src/main.js b/src/main.js
index 81150e2..438fa47 100644
--- a/src/main.js
+++ b/src/main.js
@@ -164,6 +164,9 @@ module.exports = function() {
             if (!commandMap[command]) {
                 throw 'Unknown command: ' + command;
             }
+            if (argv.r === true) {
+                throw 'No repositories specified, see list-repos';
+            }
         }).argv;
 
     // Change directory to be a sibling of coho.


Mime
View raw message