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 2EED22009DC for ; Tue, 2 May 2017 23:05:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2D773160BAB; Tue, 2 May 2017 21:05:24 +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 76D8F160B9D for ; Tue, 2 May 2017 23:05:23 +0200 (CEST) Received: (qmail 41130 invoked by uid 500); 2 May 2017 21:05: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 41121 invoked by uid 99); 2 May 2017 21:05:21 -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; Tue, 02 May 2017 21:05:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DA285DFB91; Tue, 2 May 2017 21:05:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: shazron@apache.org To: commits@cordova.apache.org Message-Id: <70063b8055e74b1499ff14aa1aadc7ed@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: =?utf-8?q?cordova-coho_git_commit=3A_Added_=28=E2=80=94global=2C_-?= =?utf-8?q?g=29_option=2C_equivalent_to_=E2=80=94no-chdir?= Date: Tue, 2 May 2017 21:05:21 +0000 (UTC) archived-at: Tue, 02 May 2017 21:05:24 -0000 Repository: cordova-coho Updated Branches: refs/heads/master 667db4ee6 -> bbce26ee5 Added (—global, -g) option, equivalent to —no-chdir This is in anticipation of publishing this again to npm, after 3 long years. This will also help for new contributor use. Alas, we can’t make -g the default since it will break current users. Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/bbce26ee Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/bbce26ee Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/bbce26ee Branch: refs/heads/master Commit: bbce26ee5a2482a1d6e1d911ed57b1b620a0db31 Parents: 667db4e Author: Shazron Abdullah Authored: Tue May 2 14:01:54 2017 -0700 Committer: Shazron Abdullah Committed: Tue May 2 14:01:54 2017 -0700 ---------------------------------------------------------------------- src/main.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/bbce26ee/src/main.js ---------------------------------------------------------------------- diff --git a/src/main.js b/src/main.js index ae510b9..d6c13cc 100644 --- a/src/main.js +++ b/src/main.js @@ -201,7 +201,21 @@ module.exports = function() { desc: 'Enable verbose logging', type: 'boolean', default: false - }); + }) + .options('global', { + desc: 'Global use of coho, equivalent to --no-chdir', + type: 'boolean', + default: false + }) + .alias('global', 'g'); + + if (optimist.argv.global) { + if (command) { + // if global is set, it is essentially --no-chdir + command.noChdir = true; + } + } + if (command && !command.noChdir) { opts = opts.options('chdir', { desc: 'Use --no-chdir to run in your CWD instead of the parent of cordova-coho/', --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org