cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject git commit: adding argument check
Date Fri, 21 Jun 2013 21:17:47 GMT
Updated Branches:
  refs/heads/plugman-registry 927ffc381 -> 7e8812fb5


adding argument check


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/7e8812fb
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/7e8812fb
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/7e8812fb

Branch: refs/heads/plugman-registry
Commit: 7e8812fb5ff37c991ada1c1e21676399541e804b
Parents: 927ffc3
Author: Anis Kadri <anis@apache.org>
Authored: Fri Jun 21 14:17:43 2013 -0700
Committer: Anis Kadri <anis@apache.org>
Committed: Fri Jun 21 14:17:43 2013 -0700

----------------------------------------------------------------------
 main.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/7e8812fb/main.js
----------------------------------------------------------------------
diff --git a/main.js b/main.js
index 0a60a3d..076b30d 100755
--- a/main.js
+++ b/main.js
@@ -86,7 +86,7 @@ else if (cli_opts.adduser) {
     });
   });
 }
-else if (cli_opts.publish) {
+else if (cli_opts.publish && cli_opts.plugin) {
   registry.use(config.registry, function(err) {
     registry.publish([cli_opts.plugin], function(err, d) {
       if(err) return console.log('Error publishing plugin', err); 
@@ -94,9 +94,9 @@ else if (cli_opts.publish) {
     });
   });
 }
-else if (cli_opts.unpublish) {
+else if (cli_opts.unpublish && cli_opts.plugin) {
   registry.use(config.registry, function(err) {
-    registry.unpublish([cli_opts.plugin, '--force'], function(err, d) {
+    registry.unpublish([cli_opts.plugin], function(err, d) {
       if(err) return console.log('Error unpublishing plugin'); 
       console.log('plugin unpublished');
     });


Mime
View raw message