You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2016/08/26 06:39:03 UTC

cordova-coho git commit: check-license - remove redundant message for flagged packages, and removed message when there are 0 flagged packages.

Repository: cordova-coho
Updated Branches:
  refs/heads/master 700161c48 -> cfa5793d4


check-license - remove redundant message for flagged packages, and removed message when there are 0 flagged packages.


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

Branch: refs/heads/master
Commit: cfa5793d48616186da7dff1eae56b3e02a2271d9
Parents: 700161c
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu Aug 25 23:38:54 2016 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Aug 25 23:38:54 2016 -0700

----------------------------------------------------------------------
 src/check-license.js | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/cfa5793d/src/check-license.js
----------------------------------------------------------------------
diff --git a/src/check-license.js b/src/check-license.js
index 7581f03..cd4ad4d 100644
--- a/src/check-license.js
+++ b/src/check-license.js
@@ -133,16 +133,19 @@ function processResults(results, repos) {
     console.log('\n***********************************************************************************************************************');
     console.log('***********************************************************************************************************************');
     console.log('***********************************************************************************************************************\n');
-    console.log(flagged.length + ' packages were flagged. Please verify manually that the licenses are valid. See those packages below.');
-    for (var j = 0; j < flagged.length; ++j)
-    {
-        if (knownIssues[ flagged[j].name ]) {
-            flagged[j]['known-issues'] = knownIssues[ flagged[j].name ];
-        }
+    if (flagged.length) {
+        for (var j = 0; j < flagged.length; ++j)
+        {
+            if (knownIssues[ flagged[j].name ]) {
+                flagged[j]['known-issues'] = knownIssues[ flagged[j].name ];
+            }
 
-        console.log(treeify.asTree(flagged[j], true));
+            console.log(treeify.asTree(flagged[j], true));
+        }
+        console.log(flagged.length + ' packages were flagged. Please verify manually that the licenses are valid. See those packages above, and update knownIssues.json with your findings, if applicable.');
+    } else {
+        console.log('No packages were flagged.');
     }
-    console.log(flagged.length + ' packages were flagged. Please verify manually that the licenses are valid. See those packages above, and update knownIssues.json with your findings, if applicable.');
 }
 
 //get dependencies for a repo


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