Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add a help option #45

Open
bastien-roucaries opened this issue May 7, 2018 · 0 comments
Open

Please add a help option #45

bastien-roucaries opened this issue May 7, 2018 · 0 comments

Comments

@bastien-roucaries
Copy link

bastien@portable2015-bastien:~/Documents/Personnel/soft/debian/js/node-tap-mocha-reporter/node-tap-mocha-reporter/debian/patches$ cat 0003-Support-a-help-option.patch 
From 94f8c101f7a55e7ad7d7df7a77db9277ffdc280d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <[email protected]>
Date: Tue, 22 Aug 2017 14:46:56 +0200
Subject: Support a --help option

forwarded: yes, https://github.com/lyroyce/mocha-tap-reporter/issues/5
bug: https://github.com/lyroyce/mocha-tap-reporter/issues/5
---
 index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 46c5663..8b2fc07 100755
--- a/index.js
+++ b/index.js
@@ -99,7 +99,7 @@ reporter.  (Note that some reporters write to files instead of stdout.)
 
 if (require.main === module) {
   var type = process.argv[2]
-  if (!type)
+  if (!type || type == '--help' || type == '-h')
     return usage()
 
   process.stdin.pipe(new Formatter(type))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant