Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D8A99200C88 for ; Fri, 2 Jun 2017 22:39:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D811F160BD2; Fri, 2 Jun 2017 20:39:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 28ED7160BBA for ; Fri, 2 Jun 2017 22:39:23 +0200 (CEST) Received: (qmail 46946 invoked by uid 500); 2 Jun 2017 20:39:22 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 46937 invoked by uid 99); 2 Jun 2017 20:39:22 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jun 2017 20:39:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2B2BCDFBC6; Fri, 2 Jun 2017 20:39:22 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: steven@apache.org To: commits@cordova.apache.org Message-Id: <3ca98c3e2af34677b4ba74b57433dd22@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: cordova-lib git commit: CB-12738: Cordova ignores plugin dependency version on windows platform Date: Fri, 2 Jun 2017 20:39:22 +0000 (UTC) archived-at: Fri, 02 Jun 2017 20:39:24 -0000 Repository: cordova-lib Updated Branches: refs/heads/master d244cf844 -> a7b5433f4 CB-12738: Cordova ignores plugin dependency version on windows platform This closes #554 Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/a7b5433f Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/a7b5433f Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/a7b5433f Branch: refs/heads/master Commit: a7b5433f47f09546a8024948d0d8935281e944de Parents: d244cf8 Author: Nikita Matrosov Authored: Thu May 11 22:43:49 2017 +0300 Committer: Steve Gill Committed: Fri Jun 2 13:39:40 2017 -0700 ---------------------------------------------------------------------- cordova-fetch/spec/fetch.spec.js | 2 +- cordova-lib/src/plugman/fetch.js | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/a7b5433f/cordova-fetch/spec/fetch.spec.js ---------------------------------------------------------------------- diff --git a/cordova-fetch/spec/fetch.spec.js b/cordova-fetch/spec/fetch.spec.js index 6f41c9c..49085fc 100644 --- a/cordova-fetch/spec/fetch.spec.js +++ b/cordova-fetch/spec/fetch.spec.js @@ -146,7 +146,7 @@ describe('platform fetch/uninstall test via npm & git tags with --save', functio expect(err).toBeUndefined(); }) .fin(done); - }, 100000); + }, 150000); }); describe('plugin fetch/uninstall test with --save', function () { http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/a7b5433f/cordova-lib/src/plugman/fetch.js ---------------------------------------------------------------------- diff --git a/cordova-lib/src/plugman/fetch.js b/cordova-lib/src/plugman/fetch.js index d06502f..75024fd 100644 --- a/cordova-lib/src/plugman/fetch.js +++ b/cordova-lib/src/plugman/fetch.js @@ -175,7 +175,7 @@ function fetchPlugin(plugin_src, plugins_dir, options) { } // If not found in local search path, fetch from the registry. var parsedSpec = pluginSpec.parse(plugin_src); - var P, skipCopyingPlugin; + var P, skipCopyingPlugin, specContainsSpecialCharacters = false; plugin_dir = path.join(plugins_dir, parsedSpec.id); // if the plugin has already been fetched, use it. if (fs.existsSync(plugin_dir)) { @@ -190,7 +190,17 @@ function fetchPlugin(plugin_src, plugins_dir, options) { if(options.projectRoot) { projectRoot = options.projectRoot; } - P = fetch(plugin_src, projectRoot, options); + + if (process.platform === 'win32' && parsedSpec.version) { + var windowsShellSpecialCharacters = ['&', '\\', '<', '>', '^', '|']; + specContainsSpecialCharacters = windowsShellSpecialCharacters.some(function (character) { + return parsedSpec.version.indexOf(character); + }); + } + + var fetchPluginSrc = specContainsSpecialCharacters ? + parsedSpec.package + '@"' + parsedSpec.version + '"' : plugin_src; + P = fetch(fetchPluginSrc, projectRoot, options); } else { P = registry.fetch([plugin_src]); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org