cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [01/50] [abbrv] cordova-lib git commit: CB-11979 added deprecation warning for subdirectories
Date Wed, 18 Jan 2017 01:56:18 GMT
Repository: cordova-lib
Updated Branches:
  refs/heads/fetch-1.0.x c7583807a -> 3c08c7268
  refs/heads/master 2bf351704 -> 3af82219f


CB-11979 added deprecation warning for subdirectories


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

Branch: refs/heads/fetch-1.0.x
Commit: 328980c2a91dada8049f1e4f27103df67ba07532
Parents: 35e9ead
Author: Sterling <sterlingann@gmail.com>
Authored: Tue Oct 18 15:29:09 2016 -0700
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Thu Oct 20 13:34:36 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/328980c2/cordova-lib/src/plugman/fetch.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/fetch.js b/cordova-lib/src/plugman/fetch.js
index d33e460..036558e 100644
--- a/cordova-lib/src/plugman/fetch.js
+++ b/cordova-lib/src/plugman/fetch.js
@@ -68,8 +68,12 @@ function fetchPlugin(plugin_src, plugins_dir, options) {
             if (result[2])
                 options.subdir = result[2];
             //if --fetch was used, throw error for subdirectories
-            if (result[2] && options.fetch) {
-                return Q.reject(new CordovaError('--fetch does not support subdirectories'));
+
+            if(options.subdir) {
+                events.emit('warn', 'support for subdirectories is deprecated and will be
removed in Cordova@7');
+                if (options.fetch) {
+                    return Q.reject(new CordovaError('--fetch does not support subdirectories'));
+                }
             }
 
             // Recurse and exit with the new options and truncated URL.


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


Mime
View raw message