File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 5
5
[ ![ Node.js CI] ( https://github.com/jsdoc2md/jsdoc-to-markdown/actions/workflows/node.js.yml/badge.svg )] ( https://github.com/jsdoc2md/jsdoc-to-markdown/actions/workflows/node.js.yml )
6
6
[ ![ js-standard-style] ( https://img.shields.io/badge/code%20style-standard-brightgreen.svg )] ( https://github.com/feross/standard )
7
7
8
- # jsdoc-to-markdown
9
-
10
8
_ Upgraders, please read the [ release notes] ( https://github.com/jsdoc2md/jsdoc-to-markdown/releases ) _
11
9
12
10
# jsdoc-to-markdown
Original file line number Diff line number Diff line change @@ -39,12 +39,11 @@ if (options.help) {
39
39
40
40
/* input files (jsdoc-options) required from here */
41
41
/* input validation */
42
- try {
43
- options . files = options . files || [ ]
44
- assert . ok ( options . files . length || options . source , 'Must supply either --files or --source' )
45
- } catch ( err ) {
42
+ options . files = options . files || [ ]
43
+ if ( ! ( options . files . length || options . source || options . configure ) ) {
44
+ console . error ( 'Must supply either --files, --source or --configure' )
46
45
console . log ( cli . usage )
47
- handleError ( err )
46
+ process . exit ( 1 )
48
47
}
49
48
50
49
/* jsdoc2md --json */
@@ -100,4 +99,5 @@ function parseCommandLine () {
100
99
101
100
function handleError ( err ) {
102
101
console . error ( err )
102
+ process . exit ( 1 )
103
103
}
You can’t perform that action at this time.
0 commit comments