File: 0003-Support-a-help-option.patch

package info (click to toggle)
node-tap-mocha-reporter 5.0.3%2B~2.0.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 752 kB
  • sloc: javascript: 2,589; makefile: 68
file content (23 lines) | stat: -rw-r--r-- 719 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: =?utf-8?q?Bastien_ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
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 b9623d7..7a626a5 100755
--- a/index.js
+++ b/index.js
@@ -91,7 +91,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))