Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): don't override missing options in…
Browse files Browse the repository at this point in the history
… protractor (#12507)

Fix #10697
  • Loading branch information
filipesilva authored and vikerman committed Oct 11, 2018
1 parent e50d779 commit 14e4fa4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/angular_devkit/build_angular/src/protractor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@ export class ProtractorBuilder implements Builder<ProtractorBuilderOptions> {
private _startDevServer(options: ProtractorBuilderOptions) {
const architect = this.context.architect;
const [project, targetName, configuration] = (options.devServerTarget as string).split(':');
// Override browser build watch setting.
const overrides = { watch: false, host: options.host, port: options.port };
// Override dev server watch setting.
const overrides: Partial<DevServerBuilderOptions> = { watch: false };
// Also override the port and host if they are defined in protractor options.
if (options.host !== undefined) { overrides.host = options.host; }
if (options.port !== undefined) { overrides.port = options.port; }
const targetSpec = { project, target: targetName, configuration, overrides };
const builderConfig = architect.getBuilderConfiguration<DevServerBuilderOptions>(targetSpec);
let devServerDescription: BuilderDescription;
Expand Down

0 comments on commit 14e4fa4

Please sign in to comment.