You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/12/23 19:48:24 UTC

cordova-lib git commit: CB-8155 Do not fail plugin installation from git url with --link (close #129)

Repository: cordova-lib
Updated Branches:
  refs/heads/master 8b75ac2e3 -> be3cd898c


CB-8155 Do not fail plugin installation from git url with --link (close #129)

This is wrong when installing a local plugin with dependencies from git repositories.


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

Branch: refs/heads/master
Commit: be3cd898c85b9f173849f24f03c9e4f862206828
Parents: 8b75ac2
Author: Martin Bektchiev <ma...@telerik.com>
Authored: Fri Dec 12 17:00:33 2014 +0200
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Dec 23 13:48:13 2014 -0500

----------------------------------------------------------------------
 cordova-lib/spec-plugman/fetch.spec.js | 9 ---------
 cordova-lib/src/plugman/fetch.js       | 6 +++---
 2 files changed, 3 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/be3cd898/cordova-lib/spec-plugman/fetch.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/fetch.spec.js b/cordova-lib/spec-plugman/fetch.spec.js
index b2a9f19..78a7c54 100644
--- a/cordova-lib/spec-plugman/fetch.spec.js
+++ b/cordova-lib/spec-plugman/fetch.spec.js
@@ -192,15 +192,6 @@ describe('fetch', function() {
                 expect(save_metadata).toHaveBeenCalledWith(test_plugin, jasmine.any(Object));
             });
         });
-        it('should throw if used with url and `link` param', function() {
-            runs(function() {
-                fetch("https://github.com/bobeast/GAPlugin.git", temp, {link:true}).then(null, function(err) { done = err; });
-            });
-            waitsFor(function() { return done; }, 'fetch promise never resolved', 250);
-            runs(function() {
-                expect(''+done).toContain('--link is not supported for git URLs');
-            });
-        });
         it('should fail when the expected ID doesn\'t match', function(done) {
             fetch('https://github.com/bobeast/GAPlugin.git', temp, { expected_id: 'wrongID' })
             .then(function() {

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/be3cd898/cordova-lib/src/plugman/fetch.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/fetch.js b/cordova-lib/src/plugman/fetch.js
index b9492f2..48bb9b5 100644
--- a/cordova-lib/src/plugman/fetch.js
+++ b/cordova-lib/src/plugman/fetch.js
@@ -76,8 +76,9 @@ function fetchPlugin(plugin_src, plugins_dir, options) {
     if ( uri.protocol && uri.protocol != 'file:' && uri.protocol[1] != ':' && !plugin_src.match(/^\w+:\\/)) {
         events.emit('log', 'Fetching plugin "' + plugin_src + '" via git clone');
         if (options.link) {
-            return Q.reject(new CordovaError('--link is not supported for git URLs'));
-        } else {
+            events.emit('log', '--link is not supported for git URLs and will be ignored');
+        }
+
             data = {
                 source: {
                     type: 'git',
@@ -96,7 +97,6 @@ function fetchPlugin(plugin_src, plugins_dir, options) {
                 metadata.save_fetch_metadata(dir, data);
                 return dir;
             });
-        }
     } else {
         // If it's not a network URL, it's either a local path or a plugin ID.
        


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