Skip to content

Commit d68a4fd

Browse files
committed
Update readme, fix exception handling
1 parent 5f163a5 commit d68a4fd

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
[![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)
66
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)
77

8-
# jsdoc-to-markdown
9-
108
_Upgraders, please read the [release notes](https://github.com/jsdoc2md/jsdoc-to-markdown/releases)_
119

1210
# jsdoc-to-markdown

bin/cli.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,11 @@ if (options.help) {
3939

4040
/* input files (jsdoc-options) required from here */
4141
/* 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')
4645
console.log(cli.usage)
47-
handleError(err)
46+
process.exit(1)
4847
}
4948

5049
/* jsdoc2md --json */
@@ -100,4 +99,5 @@ function parseCommandLine () {
10099

101100
function handleError (err) {
102101
console.error(err)
102+
process.exit(1)
103103
}

0 commit comments

Comments
 (0)