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 B0D60200BB3 for ; Wed, 2 Nov 2016 10:04:36 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id AF7ED160AFB; Wed, 2 Nov 2016 09:04:36 +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 F2330160AEA for ; Wed, 2 Nov 2016 10:04:35 +0100 (CET) Received: (qmail 35961 invoked by uid 500); 2 Nov 2016 09:04:35 -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 35952 invoked by uid 99); 2 Nov 2016 09:04:35 -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; Wed, 02 Nov 2016 09:04:35 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DC1E7E09DE; Wed, 2 Nov 2016 09:04:34 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: alsorokin@apache.org To: commits@cordova.apache.org Message-Id: <66a082c88664411b99e84c00d6abc0d6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: cordova-plugin-file-transfer git commit: CB-12100 (ios) Fixed test plugin install at platform add on cordova@6.3.1 Date: Wed, 2 Nov 2016 09:04:34 +0000 (UTC) archived-at: Wed, 02 Nov 2016 09:04:36 -0000 Repository: cordova-plugin-file-transfer Updated Branches: refs/heads/master ac5233d34 -> addf885c7 CB-12100 (ios) Fixed test plugin install at platform add on cordova@6.3.1 Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/commit/addf885c Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/addf885c Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/addf885c Branch: refs/heads/master Commit: addf885c7474422d4d5bfed62544f7f0425c23c4 Parents: ac5233d Author: Alexander Sorokin Authored: Tue Nov 1 19:15:32 2016 +0300 Committer: Alexander Sorokin Committed: Tue Nov 1 19:15:32 2016 +0300 ---------------------------------------------------------------------- tests/hooks/after_prepare.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/addf885c/tests/hooks/after_prepare.js ---------------------------------------------------------------------- diff --git a/tests/hooks/after_prepare.js b/tests/hooks/after_prepare.js index e6f01e7..6101c62 100644 --- a/tests/hooks/after_prepare.js +++ b/tests/hooks/after_prepare.js @@ -29,6 +29,7 @@ module.exports = function(context) { // get the file transfer server address from the specified variables var fileTransferServerAddress = getFileTransferServerAddress(context) || getDefaultFileTransferServerAddress(context); console.log('Tests will use the following file transfer server address: ' + fileTransferServerAddress); + console.log('If you\'re using cordova@6.3.1 and the above address is wrong at "platform add", don\'t worry, it\'ll fix itself on "cordova run" or "cordova prepare".'); // pass it to the tests writeFileTransferOptions(fileTransferServerAddress, context); @@ -51,7 +52,11 @@ module.exports = function(context) { var platformJsonFile = path.join(context.opts.projectRoot, 'platforms', context.opts.platforms[0], context.opts.platforms[0] + '.json'); var platformJson = JSON.parse(fs.readFileSync(platformJsonFile, 'utf8')); - return platformJson.installed_plugins['cordova-plugin-file-transfer-tests'].FILETRANSFER_SERVER_ADDRESS; + if (platformJson && platformJson.installed_plugins && platformJson.installed_plugins['cordova-plugin-file-transfer-tests'] && platformJson.installed_plugins['cordova-plugin-file-transfer-tests'].FILETRANSFER_SERVER_ADDRESS) { + return platformJson.installed_plugins['cordova-plugin-file-transfer-tests'].FILETRANSFER_SERVER_ADDRESS; + } else { + return null; + } } function writeFileTransferOptions(address, context) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org