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

[BUG] includes wrong folder - Errors are silent #1146

Closed
mistic100 opened this issue Nov 19, 2021 · 2 comments
Closed

[BUG] includes wrong folder - Errors are silent #1146

mistic100 opened this issue Nov 19, 2021 · 2 comments

Comments

@mistic100
Copy link

mistic100 commented Nov 19, 2021

Overview of the issue

When using "includes" to add additional documentation, if the target directory does not exist nothing is generated and the process does not fail.

Not tested but it is probably the case with other errors.

Operating System, Node.js, npm, compodoc version(s)

node 14.17.3
compodoc 1.1.15

**Compodoc configuration
{
  "$schema": "../../node_modules/@compodoc/compodoc/src/config/schema.json",
  "disableCoverage": true,
  "disableGraph": true,
  "disableDependencies": true,
  "disableDomTree": true,
  "disableInternal": true,
  "disableRoutesGraph": true,
  "disablePrivate": true,
  "disableProtected": true,
  "silent": false
}
Reproduce the error

Launch the generation with an invalid "includes" option

compodoc -c .compodocrc.json -p tsconfig.app.json --includes wrong_folder -d target/doc

And error is logged

[14:05:52] Error during wrong_folder/summary.json read
[14:05:52] Error during Additional documentation generation

But the process exits with code 0

Additionally the error is not shown at all when using silent: true. I think errors should always be displayed regardless of this option.

Suggest a Fix

When a critical error is detected :

  • make the process exist with code 1
  • always log it, regardless of the silent option
@vogloblinsky vogloblinsky added this to the 1.1.17 milestone Nov 27, 2021
@vogloblinsky vogloblinsky changed the title [BUG] Errors are silent [BUG] includes wrong folder - Errors are silent Dec 6, 2021
@mistic100
Copy link
Author

@vogloblinsky I am not sure your fix is correct

it should exit 1 on error not 0

@vogloblinsky
Copy link
Contributor

Yes, good catch, too focused on catching the error, i miss to use 1 and not 0. Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants