Skip to content

Commit

Permalink
Update readme, fix exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
75lb committed Aug 30, 2024
1 parent 5f163a5 commit d68a4fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
[![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)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)

# jsdoc-to-markdown

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

# jsdoc-to-markdown
Expand Down
10 changes: 5 additions & 5 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,11 @@ if (options.help) {

/* input files (jsdoc-options) required from here */
/* input validation */
try {
options.files = options.files || []
assert.ok(options.files.length || options.source, 'Must supply either --files or --source')
} catch (err) {
options.files = options.files || []
if (!(options.files.length || options.source || options.configure)) {
console.error('Must supply either --files, --source or --configure')
console.log(cli.usage)
handleError(err)
process.exit(1)
}

/* jsdoc2md --json */
Expand Down Expand Up @@ -100,4 +99,5 @@ function parseCommandLine () {

function handleError (err) {
console.error(err)
process.exit(1)
}

0 comments on commit d68a4fd

Please sign in to comment.