Skip to content

Commit

Permalink
add check for required outputPath option
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckyMaler authored and ZachJW34 committed Apr 29, 2020
1 parent c3fac50 commit 054b4e9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libs/docusaurus/src/builders/build-docusaurus/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from '@angular-devkit/architect';
import { build } from '@docusaurus/core/lib';
import { join, normalize } from '@angular-devkit/core';
import { from, Observable } from 'rxjs';
import { from, Observable, of } from 'rxjs';
import { map, switchMap } from 'rxjs/operators';
import { BuildDocusaurusBuilderSchema } from './schema';
import { getProjectRoot } from '../../utils';
Expand All @@ -14,6 +14,11 @@ export function runBuilder(
options: BuildDocusaurusBuilderSchema,
context: BuilderContext
): Observable<BuilderOutput> {
if (!options.outputPath) {
context.logger.error('Invalid options, "outputPath" is required.');
return of({ success: false });
}

return from(getProjectRoot(context)).pipe(
switchMap(projectRoot =>
from(
Expand Down

0 comments on commit 054b4e9

Please sign in to comment.