Skip to content

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

@mistic100

Description

@mistic100
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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions