cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [03/39] cordova-lib git commit: Downgrade error to warning
Date Sat, 15 Apr 2017 01:10:24 GMT
Downgrade error to warning

Replace error with warning message if search paths differ.
(which does happen with `cca` tool from the MobileChromeApps project)

Generally, if the `localPlugins` cache variable has been previously set,
(via programmatically calling plugin add), then subsequent calls with
differing paths will cause the process to exit, which seems a bit extreme.
As the comments suggest, this is simply not implemented, not a failure
state, and can be safely passed.

 This closes #397


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

Branch: refs/heads/common-2.0.x
Commit: 07040e7a29c06675d2a3b5e1e8261697e84af0b2
Parents: 87f8540
Author: Jeffrey Yang <jeffrey.a.yang@gmail.com>
Authored: Sun Feb 21 10:44:13 2016 -0500
Committer: Steve Gill <stevengill97@gmail.com>
Committed: Thu Mar 9 21:20:27 2017 -0800

----------------------------------------------------------------------
 cordova-lib/src/plugman/fetch.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/07040e7a/cordova-lib/src/plugman/fetch.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/fetch.js b/cordova-lib/src/plugman/fetch.js
index 954c333..6490ef3 100644
--- a/cordova-lib/src/plugman/fetch.js
+++ b/cordova-lib/src/plugman/fetch.js
@@ -277,8 +277,8 @@ function loadLocalPlugins(searchpath, pluginInfoProvider) {
         if ( !underscore.isEqual(localPlugins.searchpath, searchpath) ) {
             var msg =
                 'loadLocalPlugins called twice with different search paths.' +
-                'Support for this is not implemented.';
-            throw new Error(msg);
+                'Support for this is not implemented.  Using previously cached path.';
+            events.emit('warn', msg);
         }
         return;
     }


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


Mime
View raw message