Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 856371040C for ; Thu, 28 Nov 2013 14:03:42 +0000 (UTC) Received: (qmail 97735 invoked by uid 500); 28 Nov 2013 14:03:42 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 97603 invoked by uid 500); 28 Nov 2013 14:03:41 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 97572 invoked by uid 99); 28 Nov 2013 14:03:36 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Nov 2013 14:03:36 +0000 Date: Thu, 28 Nov 2013 14:03:36 +0000 (UTC) From: "Wei Li (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (CB-5500) customised lib urls are not used when lazy loading libs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-5500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wei Li closed CB-5500. ---------------------- Resolution: Invalid > customised lib urls are not used when lazy loading libs > -------------------------------------------------------- > > Key: CB-5500 > URL: https://issues.apache.org/jira/browse/CB-5500 > Project: Apache Cordova > Issue Type: Bug > Components: CLI > Affects Versions: 3.2.0 > Environment: All > Reporter: Wei Li > Priority: Minor > Labels: patch > > When creating a new cordova project using the cli tool, I specified customised uri paths for the libs. However, when I ran the platform add command, cordova cli is not downloading the lib from the uri I specified. It still tries to download from the default url. > The cause of the problem is found in function > has_custom_path > in src/config.js file. Around this line: > if (uri.protocol && uri.protocol[1] ==':') > The value of protocol will be like "http:" or "https:", according to nodejs document. > The value of uri.protocol[1] will never equal to ":", so the above statement will always be false. > I think the fix should be like this: > if (uri.protocol && uri.protocol[uri.protocol.length - 1] ==':') > make sure the protocol ends with ":". > A pull request has created to fix this issue: > https://github.com/apache/cordova-cli/pull/102 -- This message was sent by Atlassian JIRA (v6.1#6144)