TechDocs: Tell users when index.md is missing (better error message) (#3429)
* TechDocs: Logger already prints the name of plugin * TechDocs: Display a custom error message if provided * TechDocs: throw custom error message if index.md is not present * Language improvements. Thanks @freben Co-authored-by: Fredrik Adelöw <freben@gmail.com> Co-authored-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -53,9 +53,7 @@ export class LocalPublish implements PublisherBase {
|
||||
);
|
||||
|
||||
if (!fs.existsSync(publishDir)) {
|
||||
this.logger.info(
|
||||
`[TechDocs]: Could not find ${publishDir}, creates the directory.`,
|
||||
);
|
||||
this.logger.info(`Could not find ${publishDir}, creating the directory.`);
|
||||
fs.mkdirSync(publishDir, { recursive: true });
|
||||
}
|
||||
|
||||
@@ -63,7 +61,7 @@ export class LocalPublish implements PublisherBase {
|
||||
fs.copy(directory, publishDir, err => {
|
||||
if (err) {
|
||||
this.logger.debug(
|
||||
`[TechDocs]: Failed to copy docs from ${directory} to ${publishDir}`,
|
||||
`Failed to copy docs from ${directory} to ${publishDir}`,
|
||||
);
|
||||
reject(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user