Skip to content

Commit 58ee5bd

Browse files
committed
Automatically create the output folder if it doesn't exist yet
1 parent b074aba commit 58ee5bd

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

apps/api-documenter/src/cli/BaseAction.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ export abstract class BaseAction extends CommandLineAction {
4646
}
4747

4848
this.outputFolder = this._outputFolderParameter.value || `./${this.actionName}`;
49-
if (!fsx.existsSync(this.outputFolder)) {
50-
throw new Error('The output folder does not exist: ' + this.outputFolder);
51-
}
49+
fsx.mkdirsSync(this.outputFolder);
5250

5351
for (const filename of fsx.readdirSync(this.inputFolder)) {
5452
if (filename.match(/\.api\.json$/i)) {

0 commit comments

Comments
 (0)