Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0B715DDB5 for ; Tue, 6 Nov 2012 21:03:03 +0000 (UTC) Received: (qmail 55125 invoked by uid 500); 6 Nov 2012 21:03:02 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 55108 invoked by uid 500); 6 Nov 2012 21:03:02 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 55101 invoked by uid 500); 6 Nov 2012 21:03:02 -0000 Delivered-To: apmail-incubator-callback-commits@incubator.apache.org Received: (qmail 55098 invoked by uid 99); 6 Nov 2012 21:03:02 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2012 21:03:02 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 6C74D44CEA; Tue, 6 Nov 2012 21:03:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: filmaj@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [6/6] git commit: fixes to plugin failure output Message-Id: <20121106210302.6C74D44CEA@tyr.zones.apache.org> Date: Tue, 6 Nov 2012 21:03:02 +0000 (UTC) fixes to plugin failure output Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/commit/c7bc488a Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/tree/c7bc488a Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/diff/c7bc488a Branch: refs/heads/cordova-client Commit: c7bc488acfe245159d461c6984f4ba8df5504c67 Parents: 9f338e1 Author: Fil Maj Authored: Thu Nov 1 16:10:31 2012 -0700 Committer: Fil Maj Committed: Thu Nov 1 16:10:31 2012 -0700 ---------------------------------------------------------------------- bin/cordova | 11 +++++------ src/plugin.js | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/c7bc488a/bin/cordova ---------------------------------------------------------------------- diff --git a/bin/cordova b/bin/cordova index 6595799..a83cf6c 100755 --- a/bin/cordova +++ b/bin/cordova @@ -1,6 +1,6 @@ #!/usr/bin/env node -var cordova = require('./../cordova'), - tokens = process.argv.slice(2, process.argv.length); +var tokens = process.argv.slice(2, process.argv.length), + cordova= require('../cordova'); // provide clean output on exceptions rather than dumping a stack trace process.on('uncaughtException', function(err){ @@ -8,19 +8,18 @@ process.on('uncaughtException', function(err){ process.exit(1); }); -var cmd, version, debug, current; +var cmd, version = false, verbose = false, current; while (current = tokens.shift()) { if (current[0] == '-') { - if (current.indexOf('v') > -1) version = true; - if (current.indexOf('d') > -1) debug = true; + if (current.indexOf('version') > -1 || current[1] == 'v') version = true; + if (current.indexOf('verbose') > -1 || current[1] == 'd') verbose = true; } else { cmd = current; break; } } -// TODO figure out how to incorporate -d logging if (version) { console.log(require('../package').version); } else if (cmd === undefined) { http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/c7bc488a/src/plugin.js ---------------------------------------------------------------------- diff --git a/src/plugin.js b/src/plugin.js index 474d586..4bf5918 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -91,7 +91,7 @@ module.exports = function plugin(command, targets, callback) { intersection.forEach(function(platform) { var cmd = util.format('%s --platform %s --project "%s" --plugin "%s"', cli, platform, path.join(projectRoot, 'platforms', platform), target); var plugin_cli = shell.exec(cmd, {silent:true}); - if (plugin_cli.code > 0) throw 'An error occured during plugin installation for ' + platform + '. ' + cli.output; + if (plugin_cli.code > 0) throw 'An error occured during plugin installation for ' + platform + '. ' + plugin_cli.output; }); // Add the plugin web assets to the www folder as well @@ -144,7 +144,7 @@ module.exports = function plugin(command, targets, callback) { intersection.forEach(function(platform) { var cmd = util.format('%s --platform %s --project "%s" --plugin "%s" --remove', cli, platform, path.join(projectRoot, 'platforms', platform), targetPath); var plugin_cli = shell.exec(cmd, {silent:true}); - if (plugin_cli.code > 0) throw 'An error occured during plugin uninstallation for ' + platform + '. ' + cli.output; + if (plugin_cli.code > 0) throw 'An error occured during plugin uninstallation for ' + platform + '. ' + plugin_cli.output; }); // Remove the plugin web assets to the www folder as well