Skip to content

Commit 14e4fa4

Browse files
filipesilvavikerman
authored andcommitted
fix(@angular-devkit/build-angular): don't override missing options in protractor (#12507)
Fix #10697
1 parent e50d779 commit 14e4fa4

File tree

1 file changed

+5
-2
lines changed
  • packages/angular_devkit/build_angular/src/protractor

1 file changed

+5
-2
lines changed

packages/angular_devkit/build_angular/src/protractor/index.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,11 @@ export class ProtractorBuilder implements Builder<ProtractorBuilderOptions> {
5858
private _startDevServer(options: ProtractorBuilderOptions) {
5959
const architect = this.context.architect;
6060
const [project, targetName, configuration] = (options.devServerTarget as string).split(':');
61-
// Override browser build watch setting.
62-
const overrides = { watch: false, host: options.host, port: options.port };
61+
// Override dev server watch setting.
62+
const overrides: Partial<DevServerBuilderOptions> = { watch: false };
63+
// Also override the port and host if they are defined in protractor options.
64+
if (options.host !== undefined) { overrides.host = options.host; }
65+
if (options.port !== undefined) { overrides.port = options.port; }
6366
const targetSpec = { project, target: targetName, configuration, overrides };
6467
const builderConfig = architect.getBuilderConfiguration<DevServerBuilderOptions>(targetSpec);
6568
let devServerDescription: BuilderDescription;

0 commit comments

Comments
 (0)